Archive for the 'Infrastructure' Category

Problems connecting to old Cisco routers with SSH?

It seems like something has changed in SSH, so that if you’re using a newer version (for example, you’ve just upgraded to Ubuntu 14.04) you may find you can no longer connect to your Cisco device – it just keeps saying “Connection closed”.

After some research, I found a solution for this. It’s probably only going to benefit a tiny number of people, but if you need it, here it is!

My first attempt involved a command-line like this:-

ssh -o HostKeyAlgorithms=ssh-rsa,ssh-dss -o KexAlgorithms=diffie-hellman-group1-sha1 -o Ciphers=aes128-cbc,3des-cbc -o MACs=hmac-md5,hmac-sha1 admin@myrouter

This definitely works, but I wanted to avoid having to type this each time. You can avoid this by adding an entry in $HOME/.ssh/config  like this:-

Host myrouter
    MACs hmac-md5,hmac-sha1
    Ciphers aes128-cbc,3des-cbc
    HostKeyAlgorithms ssh-rsa,ssh-dss
    KexAlgorithms diffie-hellman-group1-sha1
    User admin

Now I can just type “ssh myrouter” and it connects without an issue.


Top artists this week from Last.fm

My Twitter feed