看板 Linux 關於我們 聯絡資訊
情況是這樣的,昨天不慎把自己home底下的.ssh給誤刪掉了, 導致無法登入.為此我產生了一組新的key,public key就給 了管理員了,private就自己留著了. 管理員的操作如下: (id_rsa.pub是public key) 1. $ mkdir /home/pipidog/.ssh 2. $ chomd 700 /home/pipidog/.ssh 3. put id_rsa.pub in /home/pipidog/.ssh <-- not a command ! 4. $ cat id_rsa.pub >> /home/pipidog/.ssh/authorized_keys 5. $ chomd 644 /home/pipidog/.ssh/authorized_keys 看起來沒什麼問題,.ssh改成644, authorize_keys也改成700 但是登入的時候,總是被refuse.所以就用ssh -v 來debug了一下,但是 實在看不懂問題究竟出在哪裡. 不曉得誰可以指點一下? //=================================================================== OpenSSH_5.5p1, OpenSSL 1.0.0e-fips 6 Sep 2011 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to savcluster.physics.ucdavis.edu [169.237.43.49] port 22. debug1: Connection established. debug1: identity file /home/pi/.ssh/id_rsa type -1 debug1: identity file /home/pi/.ssh/id_rsa-cert type -1 debug1: identity file /home/pi/.ssh/id_dsa type -1 debug1: identity file /home/pi/.ssh/id_dsa-cert type -1 debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1 debug1: match: OpenSSH_3.9p1 pat OpenSSH_3.* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.5 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'savcluster.physics.ucdavis.edu' is known and matches the RSA host key. debug1: Found key in /home/pi/.ssh/known_hosts:16 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /home/pi/.ssh/id_rsa debug1: read PEM private key done: type RSA debug1: Authentications that can continue: publickey debug1: Trying private key: /home/pi/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey). -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 169.237.42.205 ※ 編輯: pipidog 來自: 169.237.42.205 (01/29 07:16)
Tetralet:因為您的登入帳號是 pi 而不是 pipidog? 01/29 09:32