Error Connecting to IOS-XR in the LAB
I've created a new lab for testing using EVE-NG. Everything was fine. But when I tried to connect to Cisco IOS-XR from my Jumphost, I saw the message:
stack@devstack$ ssh cisco@192.168.0.7
Unable to negotiate with 192.168.0.7 port 22: no matching host key type found. Their offer:
Hmm... Their offer is nothing!
Connected to console and checked logs from the other side:
RP/0/0/CPU0:May 30 10:33:08.510 : exec[65722]: %SECURITY-LOGIN-6-AUTHEN_SUCCESS : Successfully authenticated user 'cisco' from 'console' on 'con0_0_CPU0'
RP/0/0/CPU0:May 30 10:33:59.970 : SSHD_[65831]: %SECURITY-SSHD-6-INFO_GENERAL : no matching kex found: client ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-
Hmm...
Router's configuration is quite straightforward, nothing different from hundreds others:
RP/0/0/CPU0:XRv1#show running-config ssh
Sun May 30 11:12:59.403 UTC
ssh server v2
ssh server netconf vrf default
ssh server logging
But what does it mean "Offer nothing"? And, more interesting, how to solve the issue?
It looks that Cisco IOS-XR has nothing to offer at all.
The answer is pretty simple. After generation crypto key the problem is gone.
RP/0/0/CPU0:XRv1#crypto key generate rsa
Sun May 30 11:00:02.091 UTC The name for the keys will be: the_default
Choose the size of the key modulus in the range of 512 to 4096 for your General Purpose Keypair. Choosing a key modulus greater than 512 may take a few minutes.
How many bits in the modulus [2048]:
Generating RSA keys ...
Done w/ crypto generate keypair
[OK]
Hope this will help you to solve this problem.
PS: Update from Cisco IOS-XR documentation "From Cisco IOS XR Software Release 7.0.1 and later, the SSH host-key pairs are auto-generated at the time of router boot up. Hence you need not perform steps 5 to 7 to generate the host keys explicitly."
Comments
Post a Comment