I want to enable automatic ssh login using the .ssh/config file for my git user.
Here is my .ssh/config file:
Host test
HostName myserver.net
User test
IdentityFile ~/.ssh/id_rsa
Host git
HostName myserver.net
User git
IdentityFile ~/.ssh/id_rsa
It works for my test user but not for my git user so my global SSH configuration is correct.
The configuration are exactly the same as far as I know. It used to work with git user but I'm unable what change has broken the automatic logon.
When I type:
ssh -v git
I get the following log:
...
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
Offering RSA public key: /Users/mylocalusername/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
[email protected]'s password: _
Does anyone know what could be a possible difference
Check the log on the server to see why it doesn't accept the user's key. You may need to change the log level in
sshd_config
toand restart
sshd
.