簡體   English   中英

Git SSH設置權限被拒絕(公鑰)

[英]Git SSH setup Permission denied (publickey)

我正在使用Ubuntu 8.04的VWWare映像,並在通過SSH設置git訪問時遇到問題

我得到以下輸出

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 (private)和ida_rsa (public),因為最初ssh找不到它們。

我還創建了一個配置文件, 如下所示 ...

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

沒有改變。

我是否缺少某些東西,或者在VMWare中使用SSH通常有什么問題?

問候

檢查您對本地和遠程端.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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM