Skip to main content

LINUX BOX UNABLE TO SSH COMEWARE SWITCHES (5.2/7.1)

 LINUX BOX UNABLE TO SSH COMEWARE SWITCHES (5.2/7.1)


There is issue observed that the Linux Box unable to ssh the Comware 5.2 and 7.1 switches. It is showing the follwoing error:

Unable to negotiate with 192.168.10.254 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1


These SSH compatibility issues, we can simply temporarily enable all legacy cryptography methods that our SSH client currently supports. 

We can check the supported method from the Linux Box:

ssh -Q mac
ssh -Q kex
ssh -Q key
ssh -Q cipher


We need to fix the nagotiation method using the follwing command:

{
echo -n 'Ciphers '
ssh -Q cipher | tr '\n' ',' | sed -e 's/,$//'; echo

echo -n 'MACs '
ssh -Q mac | tr '\n' ',' | sed -e 's/,$//'; echo

echo -n 'HostKeyAlgorithms '
ssh -Q key | tr '\n' ',' | sed -e 's/,$//'; echo

echo -n 'KexAlgorithms '
ssh -Q kex | tr '\n' ',' | sed -e 's/,$//'; echo

} >> ~/.ssh/config

The will add the following details on the .ssh/config file:

Now you will able to login from the Linux box to the Comware Switches.


Thanks,
Naresh Mahato.



Comments