无法SSH通过集市启动板

问题描述:

我已经将我的rsa公钥添加到我的launchpad帐户,然后当我尝试执行“ssh -v bazaar.launchpad.net”时,我得到了许可被拒绝(公钥)消息“launchpad用户没有注册的ssh密钥。”无法SSH通过集市启动板

完整的错误日志。

[email protected]:~$ ssh -v bazaar.launchpad.net 
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: /etc/ssh/ssh_config line 19: Applying options for * 
debug1: Connecting to bazaar.launchpad.net [91.189.95.84] port 22. 
debug1: Connection established. 
debug1: identity file /home/ankur/.ssh/id_rsa type 1 
debug1: identity file /home/ankur/.ssh/id_rsa-cert type -1 
debug1: identity file /home/ankur/.ssh/id_dsa type -1 
debug1: identity file /home/ankur/.ssh/id_dsa-cert type -1 
debug1: identity file /home/ankur/.ssh/id_ecdsa type -1 
debug1: identity file /home/ankur/.ssh/id_ecdsa-cert type -1 
debug1: identity file /home/ankur/.ssh/id_ed25519 type -1 
debug1: identity file /home/ankur/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6 
debug1: Remote protocol version 2.0, remote software version Twisted 
debug1: no match: Twisted 
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<3072<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: Server host key: RSA 9d:38:3a:63:b1:d5:6f:c4:44:67:53:49:2e:ee:fc:89 
The authenticity of host 'bazaar.launchpad.net (91.189.95.84)' can't be established. 
RSA key fingerprint is 9d:38:3a:63:b1:d5:6f:c4:44:67:53:49:2e:ee:fc:89. 
Are you sure you want to continue connecting (yes/no)? yes 
Warning: Permanently added 'bazaar.launchpad.net,91.189.95.84' (RSA) to the list of known hosts. 
debug1: ssh_rsa_verify: signature correct 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /home/ankur/.ssh/id_rsa 
Launchpad user 'ankur' doesn't have a registered SSH key 
debug1: Authentications that can continue: publickey 
debug1: Trying private key: /home/ankur/.ssh/id_dsa 
debug1: Trying private key: /home/ankur/.ssh/id_ecdsa 
debug1: Trying private key: /home/ankur/.ssh/id_ed25519 
debug1: No more authentication methods to try. 
Permission denied (publickey). 

这里是我的sshd_config

# Package generated configuration file 
# See the sshd_config(5) manpage for details 

# What ports, IPs and protocols we listen for 
Port 22 
# Use these options to restrict which interfaces/protocols sshd will bind to 
#ListenAddress :: 
#ListenAddress 0.0.0.0 
Protocol 2 
# HostKeys for protocol version 2 
HostKey /etc/ssh/ssh_host_rsa_key 
HostKey /etc/ssh/ssh_host_dsa_key 
HostKey /etc/ssh/ssh_host_ecdsa_key 
HostKey /etc/ssh/ssh_host_ed25519_key 
#Privilege Separation is turned on for security 
UsePrivilegeSeparation yes 

# Lifetime and size of ephemeral version 1 server key 
KeyRegenerationInterval 3600 
ServerKeyBits 1024 

# Logging 
SyslogFacility AUTH 
LogLevel INFO 

# Authentication: 
LoginGraceTime 120 
PermitRootLogin without-password 
StrictModes yes 

RSAAuthentication yes 
PubkeyAuthentication yes 
#AuthorizedKeysFile %h/.ssh/authorized_keys 

# Don't read the user's ~/.rhosts and ~/.shosts files 
IgnoreRhosts yes 
# For this to work you will also need host keys in /etc/ssh_known_hosts 
RhostsRSAAuthentication no 
# similar for protocol version 2 
HostbasedAuthentication no 
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication 
#IgnoreUserKnownHosts yes 

# To enable empty passwords, change to yes (NOT RECOMMENDED) 
PermitEmptyPasswords no 

# Change to yes to enable challenge-response passwords (beware issues with 
# some PAM modules and threads) 
ChallengeResponseAuthentication no 

# Change to no to disable tunnelled clear text passwords 
#PasswordAuthentication yes 

# Kerberos options 
#KerberosAuthentication no 
#KerberosGetAFSToken no 
#KerberosOrLocalPasswd yes 
#KerberosTicketCleanup yes 

# GSSAPI options 
#GSSAPIAuthentication no 
#GSSAPICleanupCredentials yes 

X11Forwarding yes 
X11DisplayOffset 10 
PrintMotd no 
PrintLastLog yes 
TCPKeepAlive yes 
#UseLogin no 

#MaxStartups 10:30:60 
#Banner /etc/issue.net 

# Allow client to pass locale environment variables 
AcceptEnv LANG LC_* 

Subsystem sftp /usr/lib/openssh/sftp-server 

# Set this to 'yes' to enable PAM authentication, account processing, 
# and session processing. If this is enabled, PAM authentication will 
# be allowed through the ChallengeResponseAuthentication and 
# PasswordAuthentication. Depending on your PAM configuration, 
# PAM authentication via ChallengeResponseAuthentication may bypass 
# the setting of "PermitRootLogin without-password". 
# If you just want the PAM account and session checks to run without 
# PAM authentication, then enable this but set PasswordAuthentication 
# and ChallengeResponseAuthentication to 'no'. 
UsePAM yes 

和ssh_config中

# This is the ssh client system-wide configuration file. See 
# ssh_config(5) for more information. This file provides defaults for 
# users, and the values can be changed in per-user configuration files 
# or on the command line. 

# Configuration data is parsed as follows: 
# 1. command line options 
# 2. user-specific file 
# 3. system-wide file 
# Any configuration value is only changed the first time it is set. 
# Thus, host-specific definitions should be at the beginning of the 
# configuration file, and defaults at the end. 

# Site-wide defaults for some commonly used options. For a comprehensive 
# list of available options, their meanings and defaults, please see the 
# ssh_config(5) man page. 

Host * 
# ForwardAgent no 
# ForwardX11 no 
# ForwardX11Trusted yes 
# RhostsRSAAuthentication no 
# RSAAuthentication yes 
# PasswordAuthentication yes 
# HostbasedAuthentication no 
# GSSAPIAuthentication no 
# GSSAPIDelegateCredentials no 
# GSSAPIKeyExchange no 
# GSSAPITrustDNS no 
# BatchMode no 
# CheckHostIP yes 
# AddressFamily any 
# ConnectTimeout 0 
# StrictHostKeyChecking ask 
# IdentityFile ~/.ssh/identity 
# IdentityFile ~/.ssh/id_rsa 
# IdentityFile ~/.ssh/id_dsa 
# Port 22 
# Protocol 2,1 
# Cipher 3des 
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc 
# MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160 
# EscapeChar ~ 
# Tunnel no 
# TunnelDevice any:any 
# PermitLocalCommand no 
# VisualHostKey no 
# ProxyCommand ssh -q -W %h:%p gateway.example.com 
# RekeyLimit 1G 1h 
    SendEnv LANG LC_* 
    HashKnownHosts yes 
    GSSAPIAuthentication yes 
    GSSAPIDelegateCredentials no 

我Ubuntu的机器上工作。提前 感谢

+0

请显示您的SSH配置。你如何告诉SSH使用你的本地密钥? –

+0

@ A.L请检查编辑后。我也添加了配置文件。 – cryptok263

+0

您添加了SSHD服务器配置,在这里没有帮助,对不起。您应该发布客户端配置:'〜/ .ssh/config'文件的内容([example here](http://www.cyberciti.biz/faq/create-ssh-config-file-on-linux- unix /))。 –

快速启动用户ANKUR'没有注册的SSH密钥

您还没有添加你的公钥到Launchpad中,如果您的用户名有relly ankur

https://launchpad.net/~ankur

您需要添加使用Web接口的关键(/home/ankur/.ssh/id_rsa.pub),当它会显示在上面的网址,您将能够连接。

如果不是您的用户名,请尝试ssh -v [email protected],但请确保您的密钥在https://launchpad.net/~username上可见(将username替换为您在市场上的真实用户名)。

+0

感谢它的工作。 – cryptok263

+0

@ cryptok263请点击答案左侧的勾号,将其标记为解决方案。 – Jakuje