简体   繁体   English

Git SSH设置权限被拒绝(公钥)

[英]Git SSH setup Permission denied (publickey)

I'm using a VWWare image of Ubuntu 8.04 and experiencing problems while setting up git access over SSH 我正在使用Ubuntu 8.04的VWWare映像,并在通过SSH设置git访问时遇到问题

I get the following output 我得到以下输出

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).

I have generated the keys with ssh-keygen -t rsa 我已经使用ssh-keygen -t rsa生成了密钥

and renamed them to identity (private) and ida_rsa (public), because initially they wheren't found by ssh . 并将它们重命名为identity (private)和ida_rsa (public),因为最初ssh找不到它们。

I also created a config file as depicted here ... 我还创建了一个配置文件, 如下所示 ...

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

Nothing changed. 没有改变。

Am I missing something or is there generally something wrong with using SSH in VMWare? 我是否缺少某些东西,或者在VMWare中使用SSH通常有什么问题?

Regards 问候

Check your permissions on your .ssh directory on the local and remote sides: 检查您对本地和远程端.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

If that doesn't work, run the SSH server from the command line in debug mode. 如果这不起作用,请在调试模式下从命令行运行SSH服务器。 It may give you more information why it is rejecting the login. 它可能会为您提供更多信息,为什么它拒绝登录。

sudo /usr/sbin/sshd -Dd

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM