Git-bash : ssh: start over, passed a different list publickey,password

2.8k Views Asked by At

enter image description here

I installed Git version 1.9.5-preview20141217.exe, on win 7. When I try to access my login to my new ubuntu 16.4 server (screenshot above) via SSH it fails :

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

My ~\.ssh\config file is:

LogLevel DEBUG1

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

Why is the ssh program not able to log in?

1

There are 1 best solutions below

0
user1592380 On

Based on http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/ , I added my user name to the config file so it looks like:

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

It now works at the command line with:

$ ssh deploy