我的 SSH 连接运行良好,但从上周开始,从我的笔记本电脑到我的主板的 SSH 拒绝连接。我可以建立从主板到笔记本电脑的 SSH 连接,但反之则不行。我用我的用户和 root 用户尝试过,但遇到了同样的问题。
我的笔记本电脑是 Ubuntu 12.10,我的主板是 Debian 6。
这是 SSH 的详细输出:
danialbehzadi@danial-HP:~$ ssh -v 192.168.1.2 OpenSSH_5.2p1、OpenSSL 1.0.1c 2012 年 5 月 10 日 debug1:读取配置数据 /usr/local/etc/ssh_config debug1:连接到 192.168.1.2 [192.168.1.2] 端口 22。 debug1:连接建立。 debug1:身份文件/home/danialbehzadi/.ssh/identity type -1 debug1:身份文件/home/danialbehzadi/.ssh/id_rsa type 1 debug1:身份文件/home/danialbehzadi/.ssh/id_dsa type -1 debug1:远程协议版本 2.0,远程软件版本 OpenSSH_6.0p1 Debian-4 debug1:匹配:OpenSSH_6.0p1 Debian-4 pat OpenSSH* debug1:启用协议 2.0 的兼容模式 debug1:本地版本字符串 SSH-2.0-OpenSSH_5.2 debug1: SSH2_MSG_KEXINIT 发送 debug1:收到 SSH2_MSG_KEXINIT debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: 客户端->服务器 aes128-ctr hmac-md5 无 没有主机密钥算法
Rap*_*007 11
我在将旧客户端连接到 Slackware 15 服务器时遇到同样的问题。该线程是最佳结果ssh "no hostkey alg"
,但现有答案没有解决我的问题,所以这就是我的做法。
连接尝试失败后,我在服务器的 /var/log/messages 中发现了以下内容:
sshd[pid]: Unable to negotiate with x.x.x.x port yyyyy: no matching host key type found. Their offer: ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss [preauth]
查阅sshd_config 手册页后,我将此行添加到服务器的 /etc/ssh/sshd_config 中:
HostKeyAlgorithms +ssh-rsa,ssh-dss
然后我重新加载 sshd (在服务器上):killall -HUP sshd
现在我的老客户可以再次连接了。
Dan*_*adi 10
我在板上制作了新的 rsa 和 dsa 密钥,一切正常:
~# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
~# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
72103 次 |
最近记录: |