添加一个新用户和他的pub密钥到〜/ .ssh / authorized_keys后,我无法SSH到我的切片(权限被拒绝(公钥))。
所以我改变了(在/ etc / ssh / sshd_config)ChallengeResponseAuthentication从no到yes ,并将他添加到AllowUsers。 然后,尝试SSH:连接closuresmy.IP.here
所以我把ChallengeResponseAuthentication改回了no,
`sudo kill `cat /var/run/sshd.pid` && /usr/sbin/sshd`
此后我无法使用我的pipe理员用户( piotr )login:由my.IP.hereclosures的连接。
$ 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
答案是在那个日志里:
未知键types“—– BEGIN”
看起来像你不知何故搞砸了你的私人密钥,SSH不能再读取它。
未知的密钥types“—– BEGIN”即使在正常连接中也会出现。 这不是什么坏事。 我也得到这些:debug2:key_type_from_name:未知的键types' – BEGIN'debug2:key_type_from_name:未知的键types'proc -type:'debug2:key_type_from_name:未知键types'DEK-信息:'debug2:key_type_from_name:未知键types“—– END”
在我所有的连接(公钥validation与否)