ssh - 无法ssh到服务器

标签 ssh solaris ssh-keys

<分区>

无法通过 ssh 登录服务器。所以使用 rsh 登录并尝试 ssh 主机本身时出现错误:

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

我在 /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 ]

提前致谢。

最佳答案

看起来服务器和客户端没有找到通用的身份验证方法。

我刚刚在这里用 sun 集群得到它:它只支持 diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,但我的 Gentoo GNU/Linux ssh 服务器似乎放弃 group1 算法。

通过更改 ssh 服务器上的 /etc/ssh/sshd_config 来修复

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

不过,我担心从默认值中删除 group1 算法是有原因的。我不会在可公开访问的盒子上这样做。

有关引用,另请参阅 https://security.stackexchange.com/questions/25662/openssh-default-preferred-ciphers-hash-etc-for-ssh2

关于ssh - 无法ssh到服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23653677/

相关文章:

SSH 添加 : could not add identity xxx agent refused operation

Gitkraken 讨厌我在 SourceTree 中工作的 SSH key

java - 使用JSCH执行软件远程安装

ssh - 腻子/SSH : How do I get my command line back?

mysql - Erlang 及其堆内存消耗

c - 与 gcc 链接时 Solaris 和 GNU/Linux 之间的 lpthread 库差异

mysql - 如何在 Solaris 11 SPARC 计算机上安装 MySQL 5.5

python - 我可以将 ssh/scp 与存储在数据库中的私钥一起使用吗?

python - 在python脚本中通过ssh执行哪个命令

phpseclib - 我可以使用用户名、 key 和密码(不是 key 密码)进行连接吗