This is a little helper for SSH users who use RSA keys for authentication. This applies to the situation where one or more of your keys "mysteriously" just will not work, and you get a "connection closed" message. If you look in your /var/log/system.log file and see a message like:
That's right, the problem is almost certainly a nasty, little, hidden carriage return in the RSA key you have pasted into the authorized_keys2 file. I know this works because I just suffered greatly before I was wise enough to resize my Terminal window and notice that one of the keys in my ~/.ssh/authorized_keys2 file had a carriage return in it.
Hope this saves my fellow key-pasters some time ... and I guess this is one of the reasons why you are not encouraged to paste keys in.
fatal: buffer_getwith some version of length like "more than 129," then with a little thought, we could all have made the following intuitive leap (I know I didn't ;-): RSA-2 Keys are 128 Long!
That's right, the problem is almost certainly a nasty, little, hidden carriage return in the RSA key you have pasted into the authorized_keys2 file. I know this works because I just suffered greatly before I was wise enough to resize my Terminal window and notice that one of the keys in my ~/.ssh/authorized_keys2 file had a carriage return in it.
Hope this saves my fellow key-pasters some time ... and I guess this is one of the reasons why you are not encouraged to paste keys in.
•
[3,590 views]

