我正在嘗試使用RSA密鑰來設置SSH連接,而無需使用密碼到許多服務器。它適用於大多數人,但一個給我一些麻煩。使用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
任何線索? 感謝您的幫助。
感謝您提供此信息。我沒有root權限來調查Sun_SSH的配置,但這確實是問題所在。我會盡力讓系統管理員參與其中。 – Damien 2010-09-02 18:50:56
'/ etc/ssh/ssd_config'應該是'/ etc/ssh/sshd_config'(或者可能是'/ etc/ssh/ssh_config') – 2013-08-29 20:56:40