09-03-2024 01:46 PM
I'm try to connect via ssh from my server ububtu to 2 routers:
R1 - CiscoIOS , R2 -IOS-XE
I edited the /etc/ssh/ssh_config file and add:
KexAlgorithms diffie-hellman-group1-sha1 ( for IOS work very well but not for XE )
but if I add:
KexAlgorithms diffie-hellman-group14-sha1 ( for XE work very well but not for IOS )
there area any way to configure both in the /etc/ssh/ssh_config file?
thanks.
PD. this is the error for IOS-XE:
Unable to negotiate with 192.168.80.50 port 22: no matching key exchange method found. Their offer:
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1
Solved! Go to Solution.
09-03-2024 01:58 PM
There is a similar discussion here with a solution
https://askubuntu.com/questions/1279881/ubuntu-20-04-unable-to-ssh-to-cisco-ios
09-03-2024 01:58 PM
There is a similar discussion here with a solution
https://askubuntu.com/questions/1279881/ubuntu-20-04-unable-to-ssh-to-cisco-ios
09-03-2024 02:12 PM - edited 09-03-2024 02:37 PM
Hi @f4cruz ,
You can specify both separated by a comma as follow:
KexAlgorithms diffie-hellman-group1-sha1, diffie-hellman-group14-sha1
You can check the configured values as follow:
test@test
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512
diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
curve25519-sha256
curve25519-sha256@libssh.org
sntrup4591761x25519-sha512@tinyssh.org
Regards,
09-03-2024 02:36 PM - edited 09-03-2024 02:36 PM
Hello Harold
I got this after add this line:
ssh cisco@192.168.80.50
/etc/ssh/ssh_config line 58: keyword kexalgorithms extra arguments at end of line
/etc/ssh/ssh_config: terminating, 1 bad configuration options
09-03-2024 03:00 PM
Hi @f4cruz ,
Yes, I had an extra blank in there. Glad to see you fixed it.
Regards,
09-03-2024 02:45 PM
this worked for me, thank you guys.
KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide