【发布时间】:2014-07-08 00:20:28
【问题描述】:
我有一个笨蛋。首先让我说以前这工作正常,但是由于我对我的 sshd_config 文件进行了一些更改(为了增加安全性),我无法使用
连接到我的 Debian Wheezy 盒子(从另一个 Deb Wheezy 盒子)Places > Connect To Server options.
我会说我可以通过 ssh 通过 root 终端在盒子之间来回连接,但我无法使用相同的 root 登录从一个盒子连接到另一个盒子。有人对此有任何想法吗?
我在主机 (/var/log/auth.log) 上遇到的唯一日志错误是 Connection closed by XXX.XXX.XXX.XXX [preauth]。当然,客户端机器上没有日志条目。
这是我在主机上的sshd_config 文件(为了便于阅读,删除了注释掉的行):
Port 22
Protocol
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin yes
StrictModes no
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
Banner /etc/ssh/ssh.banner
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM no
这是来自我的 CLIENT 机器的 ssh_config 文件(同样,注释掉的行已删除)
Host *
PasswordAuthentication yes
IdentityFile ~/.ssh/id_rsa
SendEnv LANG LC_*
HashKnownHosts no
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
AFAIK,在它正常工作之前我更改的唯一设置是在 sshd_config 文件上,可能只是 PasswordAuthentication RSAAuthentication 和/或 PubKeyAuthentication。
有人有什么想法吗?我四处寻找,找不到任何有效的解决方案。
同样,通过终端的 ssh 两种方式都可以正常工作,但不能通过 Places > Connect To Server(设置 SSH,使用 root 用户名和密码设置端口 22。)屏幕上的连接到服务器错误消息显示主机密钥验证失败。
提前感谢您启发我。
【问题讨论】:
-
感谢您的编辑 hnk。我把配置文件信息搞砸了。有人对此有任何想法吗?顺便说一句,我可以成功连接到其他三台服务器中的两台,只有一台失败。