public key無法登入怎麼辦? - Linux

Donna avatar
By Donna
at 2013-01-29T07:15

Table of Contents

情況是這樣的,昨天不慎把自己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).

--
Tags: Linux

All Comments

Daph Bay avatar
By Daph Bay
at 2013-02-02T19:25
因為您的登入帳號是 pi 而不是 pipidog?

Ubuntu安裝在USB隨身碟大概要多少空間?

Eden avatar
By Eden
at 2013-01-29T00:29
在man filesystems裡有提到一個umsdos 不過在2.6的早期就被drop了 從wikipedia看到了POSIX Overlay Filesystem (posixovl) Ubuntu man page看起來還可以用 Debian從squeeze就有了,應該沒什麼問題 -- 就算是frie ...

crontab時間設定

Cara avatar
By Cara
at 2013-01-28T14:25
※ 引述《leepair (leepair)》之銘言: : 大家好 : 最近想要設一個crontab,但要設的時間點有點問題~ : 想設的時間點是: 早上九點到中午一點半,每一分鐘執行一次 : 請問有辨法用一行就可以設定嗎? 拍謝: 之前發錯文把每一分鐘寫成每一小時... - ...

KDE 的 source code 管理準備從 svn 完全轉移到 git 上囉

Joe avatar
By Joe
at 2013-01-28T13:06
http://www.omat.nl/2013/01/26/svn-infrastructure-shutdown/ KDE 使用 git 來管理 source code 已經有很多年了 不過還是有不少 project 持續使用 svn 這造成開發者很多困擾 管理上也不方便 所以現在訂定了時間表 打算在 2 ...

Ubuntu安裝在USB隨身碟大概要多少空間?

Harry avatar
By Harry
at 2013-01-28T12:11
Ubuntu安裝到隨身碟一般會占用2GB左右的磁盤空間,要預留一些空間用來存儲自己的文 檔,所以我一般都是用8GB容量的隨身碟來安裝Ubuntu系統。 ※ 引述《solomn (九米)》之銘言: : 想要安裝Ubuntu在USB隨身碟 : 嘗試日常應用取代Win : 大概就一般上網、Google服務、Dro ...

Re: qsub 如何指定node

Brianna avatar
By Brianna
at 2013-01-28T06:08
: 4) qsub -l nodes=hostname1+hostname2+hostname3 (skip the host name for not : 另外還看到一種說法 滿XD的 : http://moss.csc.ncsu.edu/~mueller/cluster/arc/faq.html : R ...