2010-10-04 161 views
5

我使用Ubuntu 8.04的VWWare形象和體驗問題,同時建立了SSH git的訪問Git的SSH設置權限被拒絕(公鑰)

我得到以下輸出

debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Offering public key: 
debug1: Authentications that can continue: publickey 
debug1: Offering public key: 
debug1: Authentications that can continue: publickey 
debug1: Offering public key: 
debug1: Authentications that can continue: publickey 
debug1: Offering public key: 
debug1: Authentications that can continue: publickey 
debug1: Trying private key: /home/jars/.ssh/identity 
debug1: PEM_read_PrivateKey failed 
debug1: read PEM private key done: type <unknown> 
Enter passphrase for key '/home/jars/.ssh/identity': 
debug1: read PEM private key done: type RSA 
debug1: Authentications that can continue: publickey 
debug1: No more authentication methods to try. 
Permission denied (publickey). 

我已經產生與ssh-keygen -t rsa

密鑰並將其重命名爲identity(私人)和ida_rsa(公共),因爲最初他們wheren't通過ssh發現。

我還創建一個配置文件as depicted here ...

http://help.github.com/troubleshooting-ssh/

沒有改變。

我是否錯過了某些東西或者在使用SSH時在VMWare中出現了什麼問題?

問候

+0

給管理員的注意事項:任何Git問題與超級用戶沒有任何關係。 Git是一個**編程**工具,因此100%屬於SO。 – VonC 2010-10-04 20:40:54

+0

'私人'?我認爲一個ssh rsa私鑰的名字是'id_rsa',而不是'private' ... – VonC 2010-10-04 20:41:39

+0

@Von:這不是一個GitHub的問題,它與創建和使用公鑰/私鑰的問題有關。 – 2010-10-04 20:42:10

回答

5

檢查本地和遠程雙方就你的.ssh目錄您的權限:

drwx------ 3 xxx xxx 216 10-04 12:30 .ssh/ 
-rw------- 1 xxx xxx 745 06-19 12:37 authorized_keys 
-rw------- 1 xxx xxx 783 05-08 22:15 config 
-rw------- 1 xxx xxx 3.3K 2009-02-21 id_rsa 
-rw------- 1 xxx xxx 745 2009-03-06 id_rsa.pub 
-rw-r--r-- 1 xxx xxx 53K 09-27 15:51 known_hosts 

如果不工作,運行在調試模式下的命令行的SSH服務器。它可能會給你更多的信息,爲什麼它拒絕登錄。

sudo /usr/sbin/sshd -Dd 
+0

謝謝!以調試模式運行ssh服務器非常有幫助。 – vinod 2012-07-27 11:58:48