sshd – DanDev.com http://www.dandev.com Tidbits about software development Thu, 05 Dec 2013 20:21:39 +0000 en-US hourly 1 SSHD Error: buffer_get_ret: trying to get more bytes 4 than in buffer 0 http://www.dandev.com/2011/10/sshd-error-buffer_get_ret-trying-to-get-more-bytes-4-than-in-buffer-0/ http://www.dandev.com/2011/10/sshd-error-buffer_get_ret-trying-to-get-more-bytes-4-than-in-buffer-0/#comments Mon, 03 Oct 2011 01:18:44 +0000 http://www.dandev.com/?p=225 If you have run in to an error similar to this in your /var/log/secure log file: Oct 2 21:12:05 phptest sshd[31998]: error: buffer_get_ret: trying to get more bytes 4 than […]

The post SSHD Error: buffer_get_ret: trying to get more bytes 4 than in buffer 0 appeared first on DanDev.com.

]]>
If you have run in to an error similar to this in your /var/log/secure log file:

Oct  2 21:12:05 phptest sshd[31998]: error: buffer_get_ret: trying to get more bytes 4 than in buffer 0
Oct  2 21:12:05 phptest sshd[31998]: fatal: buffer_get_int: buffer error

Check your public key in ~/.ssh/authorized_keys or ~/.ssh/authorized_keys2 in a text editor and make sure each key is on one line. The prefix “ssh-rsa” followed by a space and then your key should all be on one line, and you might also have a comment after that describing the key. If your key spans multiple lines you will often get an error similar to the above message in your /var/log/secure log file.

You usually only see this when you’re trying to connect using key-based authentication. The error is caused by extra newlines in the authorized_keys list. When copying a public key out of PuttyGen(or similar key-generation software), because the key spans multiple lines, you can end up with extra newlines in the text when it gets copied to the clipboard.

The post SSHD Error: buffer_get_ret: trying to get more bytes 4 than in buffer 0 appeared first on DanDev.com.

]]>
http://www.dandev.com/2011/10/sshd-error-buffer_get_ret-trying-to-get-more-bytes-4-than-in-buffer-0/feed/ 1