Using SSH to connect to a remote system is a part of the job for many people. There are many tweaks available to play around with SSH. However, you may not always be using the same system to connect from. Here’s a quick guide to give you a responsive experience over SSH even with X forwarding. All the changes are on the client-side. So whether it would work depends on how the server is configured too. However, in a secured network, you may not be allowed to change anything on the server which is why there are no SSH server config changes here.
In the rest of the article ssh config file refers to /etc/ssh/ssh_config on the client system from which you are connecting.
$ ssh -X firstname.lastname@example.org
or, add the following in the ssh config file to do that permanently
ForwardX11Trusted yes //if you trust remote.com
ForwardX11 yes //even if remote.com is untrusted
Compression and reasonable encryption
$ ssh -XC -c blowfish-cbc,arcfour email@example.com
or, add the following to ssh config file
Disconnect hung connection
It happens more often than you think! You can get out of a hung SSH connection by keying in
i.e., you press Enter, then ~, then .
This one is a bit risky because if the master session hangs, the newly created ones will also hang forcing you to delete the socket or manually kill it.
To try it out, add the following in the config file
If you can’t avoid using SSH from mobile or tablet devices, check out mosh.