SSH automatic logon works for one user but not the other

Posted by tinmaru on Server Fault See other posts from Server Fault or by tinmaru
Published on 2012-11-10T12:01:41Z Indexed on 2012/11/10 17:04 UTC
Read the original article Hit count: 183

Filed under:
|

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

© Server Fault or respective owner

Related posts about ssh

Related posts about ssh-keys

  • Is it reasonable to have multiple SSH keys?

    as seen on Super User - Search for 'Super User'
    So far I've created a separate SSH key for each server I need to login to (for each purpose, to be more accurate). I did it out of a sense of security, just like different passwords to different sites. Does having multiple SSH keys actually improve security? All of them are used from the same machine… >>> More

  • Ubuntu Github ssh keys issue

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I followed every step given in this guide: http://help.github.com/linux-key-setup/ When I get to the end I am able to ssh to [email protected], getting the response: PTY allocation request failed on channel 0 Hi AlexBaranosky! You've successfully authenticated, but GitHub does not provide shell… >>> More

  • Problem with shared ssh keys

    as seen on Super User - Search for 'Super User'
    Following the process I've used in other environments (http://www.trilug.org/pipermail/trilug/Week-of-Mon-20080602/054712.html), I've tried setting-up shared keys between my Mac and my CentOS 4 webserver. I've seen the same problem with my older Ubuntu 7.10 workstation trying to connect via keys to… >>> More

  • Invalidating unused ssh keys

    as seen on Server Fault - Search for 'Server Fault'
    I am using one ssh account for all my Subversion users. They send me their public keys and I put them in .ssh/authorized_key of the svn account, then they can check out the code from Subversion using ssh tunnel. So far everything works fine. The problem though is that I want to invalidate keys that… >>> More

  • SSH keys fail for one user

    as seen on Server Fault - Search for 'Server Fault'
    I just set up a new Debian server. I disabled root SSH and password auth, so you've gotta use a key file. For my primary user, everything works exactly as expected. I used ssh-keygen -t dsa and got myself a public and private key. Put one in authorized keys, put the other in a pem file locally. I… >>> More