2010-10-04 459 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