Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Avoid SSH key length errors in RSA keys UNIX
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:
  fatal:  buffer_get 
with 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.
    •    
  • Currently 2.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[3,590 views]  

Avoid SSH key length errors in RSA keys | 1 comments | Create New Account
Click here to return to the 'Avoid SSH key length errors in RSA keys' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Avoid SSH key length errors in RSA keys
Authored by: pwharff on Jul 15, '03 02:23:31AM
Next time instead of copying and pasting, transfer the id_rsa.pub file to your .ssh directory and then type the following in the terminal:

cat id_rsa.pub >> authorized_keys2

This way there is no guessing if it got added correctly. BTW, I use to always have this problem with my rsa keys until someone else showed me. =)

[ Reply to This | # ]