Pretty much as the title says - I'm trying to connect to it through putty and continuously get . I checked the IP address through both my router AND by connecting the Pi to a TV, and it matches consistently, but I just can't seem to ssh into it? I've pinged the IP address from my desktop and it connects fine just can't get through ssh.
Googling "couldn't agree a client-to-server cipher" returns this as the first result. It seems to be the exact same problem.
The solution is to add a "Ciphers" line to /etc/ssh/sshd_config
(I assume on the Pi). This cipher must be one that is supported by PuTTY. There is a list of them here.
The solution that they actually used here was to just simply update PuTTY, which fixed their issue. If this does not work for you, try adding the cipher.
-
Yeah, strangely enough I tried (on a whim) connecting from my laptop - worked flawlessly. I'm thinking I just have an older version on my desktop that's not agreeing with it. I'll go ahead and do that, and if it works, mark this as the correct answer. – secondubly Feb 19 '16 at 3:55
-
@TaiM. Cheers, if for some strange reason it doesn't work, be sure to tell me. I'd be happy to find another solution! – Patrick Cook Feb 19 '16 at 4:00
Buried, but mentioned above, making sure you have the latest version of Putty will solve the problem. I had this issue with Putty 0.54 from 2007, and updated to 0.70 from 2017. I could login and get the expected request to save my key.
For SecureCRT and other SSH clients you can add the following line to your /etc/ssh/sshd_config
Ciphers 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,arcfour128,arcfour256,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
*It shoud all be on the same line without line breaks.
Then restart the SSH daemon using sudo /etc/init.d/ssh restart
Note, that those ciphers are old and not very secured. It is recommanded to update your client and avoid them, especially if you're on a public network.
couldn't agree a client-to-server cipher
config issue – Jaromanda X Feb 19 '16 at 3:44netstat -tuplen
on your Pi. The third column should contain0.0.0.0:22
if it is open. – Patrick Cook Feb 19 '16 at 3:46sshd
, the daemon on the RPi - it just doesn't like how you are talking to it! 8-) For some reason Putty on the Windoze PC and that daemon cannot agree on how to encrypt the communications - so one of them is setting the bar too high for the other to get over - if you haven't fiddled with the settings on the RPi then I guess you need to check the encryption options on Putty (and that you are usingssh
and not the insecurerlogin
ortelnet
which I think Putty might be able to talk with as well IIRC!) – SlySven Feb 19 '16 at 4:49