Closed. This question is off-topic。它当前不接受答案。












想改善这个问题吗? Update the question,所以它是用于堆栈溢出的on-topic

7年前关闭。



Improve this question




我正在尝试使用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版本造成的。另一个可以正常工作的服务器为我提供以下输出(远程协议(protocol)版本为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

有什么线索吗?
谢谢你的帮助。

最佳答案

服务器可以配置为拒绝基于公共(public)密钥的无密码身份验证。我不知道Sun_SSH,但是在OpenSSH(Linux / * BSD系统上最普遍的SSH实现)中,这是更改/etc/ssh/sshd_config(v1协议(protocol)的RSAAuthentication选项,v2的PubkeyAuthentication)中的某些设置的问题。

08-27 03:56