sshd 问题(可能与 ChallengeResponseAuthentication 或‘未知密钥类型’有关)

sshd 问题(可能与 ChallengeResponseAuthentication 或‘未知密钥类型’有关)

将新用户及其公钥添加到 ~/.ssh/authorized_keys 后,我无法 ssh 到我的切片(权限被拒绝(公钥))。

因此我将(在 /etc/ssh/sshd_config 中)ChallengeResponseAuthentication 从是的并将他添加到 AllowUsers。然后,在尝试 ssh 后:连接由 my.IP.here 关闭

所以我把 ChallengeResponseAuthentication 改回了 no,

`sudo kill `cat /var/run/sshd.pid` && /usr/sbin/sshd`

从那时起我就无法使用管理员用户登录(彼得): my.IP.here 关闭连接。

$ ssh -p my.port.here [email protected] -vvv
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to my.IP.here [my.IP.here] port my.port.here.
debug1: Connection established.
debug1: identity file /Users/piotr/.ssh/identity type -1
debug3: Not a RSA1 key file /Users/piotr/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /Users/piotr/.ssh/id_rsa type 1
debug1: identity file /Users/piotr/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5ubuntu1
debug1: match: OpenSSH_5.1p1 Debian-5ubuntu1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
Connection closed by my.IP.here

答案1

答案就在那篇日志里:

未知的密钥类型‘-----BEGIN’

似乎你以某种方式弄乱了你的私钥并且 ssh 不再能够读取它。

答案2

即使在正常连接中也会出现未知密钥类型 '-----BEGIN'。这不是什么坏事。我还得到了这些:debug2:key_type_from_name:未知密钥类型 '-----BEGIN' debug2:key_type_from_name:未知密钥类型 'Proc-Type:' debug2:key_type_from_name:未知密钥类型 'DEK-Info:' debug2:key_type_from_name:未知密钥类型 '-----END'

在我的所有连接中(无论是否经过公钥认证)

相关内容