【发布时间】:2010-08-30 23:01:39
【问题描述】:
我正在尝试使用 RSA 密钥在没有密码的情况下与许多服务器建立 SSH 连接。它对他们中的大多数人都有效,但其中一个给我带来了一些麻烦。
我过去发现的最常见问题是远程主机上 .ssh 或 authorized_keys 的权限问题,但在这里它们似乎是正确的,如下所示:
drwx------ ~/.ssh
-rw-r--r-- ~/.ssh/authorized_keys
这里是 ssh -v 命令到该服务器的输出(我只是更改了主机名和 IP):
Sun_SSH_1.1.3, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to myhost.mydomain.com [123.123.123.123] port 22.
debug1: Connection established.
debug1: identity file /export/home/webdev1/.ssh/identity type -1
debug1: identity file /export/home/webdev1/.ssh/id_rsa type 1
debug1: identity file /export/home/webdev1/.ssh/id_dsa type -1
debug1: Remote protocol version 1.5, remote software version 1.2.31
debug1: match: 1.2.31 pat 1.2.1*,1.2.2*,1.2.3*
debug1: Local version string SSH-1.5-Sun_SSH_1.1.3
debug1: Waiting for server public key.
debug1: Received server public key (768 bits) and host key (1024 bits).
debug1: Host 'myhost.mydomain.com' is known and matches the RSA1 host key.
debug1: Found key in /export/home/webdev1/.ssh/known_hosts:6
debug1: Encryption type: 3des
debug1: Sent encrypted session key.
debug1: cipher_init: set keylen (16 -> 32)
debug1: cipher_init: set keylen (16 -> 32)
debug1: Installing crc compensation attack detector.
debug1: Received encrypted confirmation.
debug1: Doing password authentication.
我怀疑这可能是由于 SSH 版本。另一个工作的服务器给了我以下输出(远程协议版本 2.0 而不是 1.5):
debug1: Remote protocol version 2.0, remote software version Sun_SSH_1.1.3
debug1: match: Sun_SSH_1.1.3 pat Sun_SSH_1.1.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_1.1.3
有什么线索吗? 感谢您的帮助。
【问题讨论】: