Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, I come here cause i can't success to add one public key by user, to enable them to use their own git repo on the same server (actually, every ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2012
    Posts
    3

    One public key by user (sshd_config)


    Hello,

    I come here cause i can't success to add one public key by user, to enable them to use their own git repo on the same server (actually, every user log themself to root to use git).

    So i generated others keys and i put it in their /var/www/user/.ssh/authorized_keys file.

    I uncommented the
    Code:
    AuthorizedKeysFile      %h/.ssh/authorized_keys
    line in the sshd_confif file, then i restarted ssh.

    When i try to push without to be root, i still get this error:
    Code:
    Permission denied (publickey).
    fatal: The remote end hung up unexpectedly
    What i missed ?

    Thanks !

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Copy the user key into .ssh/authorized_keys of the machine they are trying to access.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Apr 2012
    Posts
    3
    Hello,

    That's what i did, i sent it on github.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Under what user name is the user logging in as and where did you place the key?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #5
    Just Joined!
    Join Date
    Apr 2012
    Posts
    3
    Hello Lazydog,

    I did another test, the only difference was i generated the rsa keys from the user account instead the root acccount this time and it's work fine !

    Thanks for help !

  7. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    That is the way you are supposed to do it.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •