Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error! Server Host Key Algorithm Mismatch (rsa-sha2-256 vs rsa-sha2-256) #183

Open
ProVinciall opened this issue Jul 12, 2023 · 0 comments

Comments

@ProVinciall
Copy link

ProVinciall commented Jul 12, 2023

Installed Looking Glass 2.2.0 from docker.
When requesting ssh-password on cisco ios-xr, we get the error:
"Error! Server Host Key Algorithm Mismatch (rsa-sha2-256 vs rsa-sha2-256)"
Please help solve this problem.

RP/0/RSP0/CPU0:#show ssh server
---------------------
SSH Server Parameters
---------------------
Current supported versions := v2
                  SSH port := 22
                  SSH vrfs := vrfname:=mgmt0(v4-acl:=, v6-acl:=)  vrfname:=mgmt1(v4-acl:=, v6-acl:=)
 Algorithms
---------------
        Hostkey Algorithms := x509v3-ssh-rsa,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dsa,ssh-ed25519
   Key-Exchange Algorithms := ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group14-sha1
     Encryption Algorithms := aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
            Mac Algorithms := hmac-sha2-512,hmac-sha2-256,hmac-sha1

RP/0/RSP0/CPU0:# show ssh trace all | in 1638861

Jul 12 13:32:59.818 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] PID:=1386549654, ssh child spawned
Jul 12 13:32:59.843 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] session_id:=1638861, rekeytime:=3600, sessionlimit:=64
Jul 12 13:32:59.843 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] do_xml:=0, enable_cbc:=0, hmac_sha_mask:=0, type:=1, sock:=0, version:=2
Jul 12 13:32:59.843 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] Port:=22, Service running
Jul 12 13:32:59.845 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] Session_pid:=1386549654, Session_num:=1638861
Jul 12 13:32:59.846 ssh/child57/event 0/RSP0/CPU0 t1  [SId:=1638861] client_str:=SSH-2.0-phpseclib_3.0 (libsodium, openssl, gmp)
Jul 12 13:32:59.846 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] Remote-protocol-version:=2.0,
Jul 12 13:32:59.846 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] Version Exchange done
Jul 12 13:32:59.846 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] Rekey-Interval:= 3600, Rekey Datasize:=1073741824
Jul 12 13:32:59.846 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] Rekey Timer initialized
Jul 12 13:32:59.923 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] ecsdsa-nist256:=not-available, ecdsa-nist384:=not-available, ecdsa-nist521:=not-available, rsa:=available, dsa:=not-available, host key found
Jul 12 13:32:59.924 ssh/child57/init 0/RSP0/CPU0 t1  [SId:=1638861] Negotiated Alg:=ecdh-sha2-nistp256, Publickey Alg:=rsa-sha2-256, Incoming cipher:=aes256-gcm@openssh.com, Outgoing cipher:=aes256-gcm@openssh.com, Incoming mac:=aes-gcm, Outgoing mac:=aes-gcm
Jul 12 13:32:59.995 ssh/child57/error 0/RSP0/CPU0 t1  [SId:=1638861] Exit-code:=16
Jul 12 13:32:59.995 ssh/child57/event 0/RSP0/CPU0 t1  [SId:=1638861] readbytes:=-1, Error:=Connection reset by peer(0xfe)
Jul 12 13:32:59.997 ssh/child57/error 0/RSP0/CPU0 t1  [SId:=1638861] Exit-code:=25
Jul 12 13:33:00.007 ssh/server/event 0/RSP0/CPU0 t1  [SId:=0] Child-Session-Id:=1638861, Index:=57, Releasing

When I connect via ssh from the container, the result is normal

Jul 12 13:43:41.810 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] PID:=1387221396, ssh child spawned
Jul 12 13:43:41.835 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] session_id:=1638993, rekeytime:=3600, sessionlimit:=64
Jul 12 13:43:41.835 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] do_xml:=0, enable_cbc:=0, hmac_sha_mask:=0, type:=1, sock:=0, version:=2
Jul 12 13:43:41.835 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] Port:=22, Service running
Jul 12 13:43:41.837 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] Session_pid:=1387221396, Session_num:=1638993
Jul 12 13:43:41.838 ssh/child10/event 0/RSP0/CPU0 t1  [SId:=1638993] client_str:=SSH-2.0-OpenSSH_8.4p1 Debian-5
Jul 12 13:43:41.838 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] Remote-protocol-version:=2.0,
Jul 12 13:43:41.838 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] Version Exchange done
Jul 12 13:43:41.838 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] Rekey-Interval:= 3600, Rekey Datasize:=1073741824
Jul 12 13:43:41.838 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] Rekey Timer initialized
Jul 12 13:43:41.915 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] ecsdsa-nist256:=not-available, ecdsa-nist384:=not-available, ecdsa-nist521:=not-available, rsa:=available, dsa:=not-available, host key found
Jul 12 13:43:41.916 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] Negotiated Alg:=ecdh-sha2-nistp256, Publickey Alg:=rsa-sha2-512, Incoming cipher:=aes128-ctr, Outgoing cipher:=aes128-ctr, Incoming mac:=hmac-sha2-256, Outgoing mac:=hmac-sha2-256
Jul 12 13:43:41.944 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] All Packets will be encrypted now
Jul 12 13:43:41.945 ssh/child10/event 0/RSP0/CPU0 t1  [SId:=1638993] Started client authentication
Jul 12 13:43:41.945 ssh/child10/init 0/RSP0/CPU0 t1  [SId:=1638993] Key exchange successfully done
Jul 12 13:43:42.146 ssh/child10/event 0/RSP0/CPU0 t1  [SId:=1638993] Service:=ssh-userauth, service request received from client
Jul 12 13:43:42.147 ssh/child10/event 0/RSP0/CPU0 t1  [SId:=1638993] Service accept message sent
Jul 12 13:43:42.147 ssh/child10/event 0/RSP0/CPU0 t1  [SId:=1638993] Msg-Type:=50, Received from client
Jul 12 13:43:42.147 ssh/child10/event 0/RSP0/CPU0 t1  [SId:=1638993] User:=lookgl, user-auth request receivedfrom client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant