The Issue
I’m on Mac OSX 10.5 connecting to a Centos 5 box using Terminal. I’m using shared keys and the connection was fine and working well until I left the Terminal window idle for over 15 seconds. I was also finding that SFTP sessions via Transmit would regularly freeze. All of this was very annoying and frustrating.
The solution
I discovered that through creating a local config file for ssh you can declare settings that fix this and many other issues. Remember I’m on a Mac OSX 10.5 here. The usual disclaimer applies - this article is unsupported and you make changes at your own risk.
Open terminal and get going:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
Now try connecting via SSH and this should stop your SSH sessions freezing. This instantly fixed the issue for me anyway. Hopefully it might help a few other people.
Other uses
Through reading the documentation I discovered it is also possible to set configuration on a per user basis for SSH. You can set compression, the port number you are connecting to, specific settings for hostnames and much more.
If you are using SSH on a daily basis having a quick read of the documentation - is likely to throw up a few useful things you can put into a config file.