针对Git的bash:SSH:重新开始,通过不同的列表公钥,密码

问题描述:

enter image description here针对Git的bash:SSH:重新开始,通过不同的列表公钥,密码

我安装了Git版本1.9.5-preview20141217.exe,在Win 7.当我尝试访问我登录到我的新Ubuntu的服务器16.4(上面的截图),通过SSH失败:

$ ssh -vvv deploy 
....... 
debug3: load_hostkeys: loaded 1 keys 
debug1: Host '198.xxx.xxx.xxx' is known and matches the ECDSA host key. 
debug1: Found key in ~/.ssh/known_hosts:25 
debug1: ssh_ecdsa_verify: signature correct 
debug2: kex_derive_keys 
debug2: set_newkeys: mode 1 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug2: set_newkeys: mode 0 
debug1: SSH2_MSG_NEWKEYS received 
debug1: Roaming not allowed by server 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug2: service_accept: ssh-userauth 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug2: key: ~/.ssh/deploy (0xa01d230), explicit 
debug1: Authentications that can continue: publickey,password 
debug3: start over, passed a different list publickey,password 
debug3: preferred publickey 
debug3: authmethod_lookup publickey 
debug3: remaining preferred: 
debug3: authmethod_is_enabled publickey 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: ~/.ssh/deploy 
debug3: send_pubkey_test 
debug2: we sent a publickey packet, wait for reply 
debug1: Authentications that can continue: publickey,password 
debug2: we did not send a packet, disable method 
debug1: No more authentication methods to try. 
Permission denied (publickey,password). 

~\.ssh\config文件是:

LogLevel DEBUG1 

Host deploy 
    HostName 198.xx.xxx.xx 
    PreferredAuthentications publickey 
    IdentityFile ~/.ssh/deploy 
    IdentitiesOnly yes 

为什么SSH程序无法登录?

基于http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/,我说我的用户名到配置文件,因此它看起来像:

Host deploy 
    HostName 198.xx.xxx.xx 
    User coolio 
    PreferredAuthentications publickey 
    IdentityFile ~/.ssh/deploy 
    IdentitiesOnly yes 

现在它在命令行中使用:

$ ssh deploy