Pergunta

not able to login into server through ssh. so logged in with rsh and when trying to ssh host itself getting error :

no common kex alg: client 'diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1', server 'gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g=='

I found this log in /var/svc/log/network-ssh:default.log

[ May 14 21:23:13 Rereading configuration. ]

[ May 14 21:23:13 Executing refresh method ("/lib/svc/method/sshd restart") ]

[ May 14 21:23:13 Method "refresh" exited with status 0 ]

[ May 14 21:30:25 Stopping because service disabled. ]

[ May 14 21:30:25 Executing stop method (:kill) ]

[ May 14 21:33:08 Enabled. ]

[ May 14 21:33:08 Executing start method ("/lib/svc/method/sshd start") ]

Could not load host key: /.ssh/id_dsa

Could not load host key: /.ssh/identity

Disabling protocol version 1. Could not load host key

[ May 14 21:33:08 Method "start" exited with status 0 ]

thanks in advance.

Foi útil?

Solução

Looks like the server and client don’t find a common authentication method.

I just got that with a sun cluster here: It only supports diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1, but my Gentoo GNU/Linux ssh server seems to have dropped the group1 algo.

Fixed by changing /etc/ssh/sshd_config on the ssh server to include

KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521

I fear, though, that there was a reason for removing the group1 algorithm from the default. I would not do this on a publicly accessible box.

For reference also see https://security.stackexchange.com/questions/25662/openssh-default-preferred-ciphers-hash-etc-for-ssh2

Outras dicas

Turn on verbose ssh which will hopefully show where the issue is.

E.g.

ssh -v host

If that doesn't give enough info, you can try

ssh -vv host

or even

ssh -vvv host

Look for the first error in the output which will hopefully give you clues as to where the issue lies.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top