Pretty much as the title says - I'm trying to connect to it through putty and continuously get this error. 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.

  • Are you trying to connect through your public or private IP? Commented Feb 19, 2016 at 3:43
  • @PatrickCook my private ip
    – secondubly
    Commented Feb 19, 2016 at 3:43
  • 4
    @PatrickCook it's not an IP aaddress issue couldn't agree a client-to-server cipher config issue Commented Feb 19, 2016 at 3:44
  • Check to see if port 22 is open by typing the command netstat -tuplen on your Pi. The third column should contain if it is open. Commented Feb 19, 2016 at 3:46
  • Given that on your PC you are getting that response then you are talking to the sshd, 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 using ssh and not the insecure rlogin or telnet which I think Putty might be able to talk with as well IIRC!)
    – SlySven
    Commented Feb 19, 2016 at 4:49

3 Answers 3


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
    Commented Feb 19, 2016 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! Commented Feb 19, 2016 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,[email protected] ,aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]

*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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.