Skip to content

Instantly share code, notes, and snippets.

@StewAlexander-com
Created May 25, 2022 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StewAlexander-com/a39751f44601b77b36aa13c1fa6342b1 to your computer and use it in GitHub Desktop.
Save StewAlexander-com/a39751f44601b77b36aa13c1fa6342b1 to your computer and use it in GitHub Desktop.
How to ssh into older Cisco switches with Ubuntu / Linux
Open /etc/ssh/ssh_config via a Linux editor like vi, vim, nano, ne or etc
Example: #sudo nano /etc/ssh/ssh_config
Copy the following to the top of the ssh_config file (anything with a "*" wildcard in it has to be last):
Host <IP / Host Name>
User <your username>
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa
Ciphers aes128-ctr
KexAlgorithms +diffie-hellman-group1-sha1 #(or whatever the cipher it asks for)
Host <IP / Host Name>
User <your username>
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa
Ciphers aes128-ctr
KexAlgorithms +diffie-hellman-group14-sha1 #(example of a different cipher)
Host 10.2.0.* #Anything with a wildcard, i.e. "*" needs to be last
User <your username>
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa
Ciphers aes128-ctr
KexAlgorithms +diffie-hellman-group14-sha1
@StewAlexander-com
Copy link
Author

Took ages to figure this out, but doing the above will allow Ubuntu to ssh into old Cisco IOS switches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment