You are not logged in.

#1 2015-11-29 23:47:25

IlikePepsi
Member
Registered: 2013-10-29
Posts: 10

ssh access requires password despite present authorized key entry

Hi,

what I want to do is access a repository on a remote Arch Linux machine with git over ssh. On that machine a 'git' user is already present due to the git-package. The passwd entry of that user is

git:x:999:999:git daemon user:/share/git:/bin/bash

As you can see I assigned

/share/git

as home directory to that user. According to this guide creating a .ssh directory with an authorized_keys file and adding my public key to that file is sufficient but I still get prompted for a password.

For example the git repository my_repo.git in /share/git/my_repo.git can be cloned with the command line

git clone git@my_machine:my_repo.git

but I get a password prompt for the git user.

It seems not to be a problem of the sshd daemon since I can login on other users with the same method without being password prompted. So I'm running out of ideas and help is much appreciated.

Offline

#2 2015-11-30 00:01:41

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,720

Re: ssh access requires password despite present authorized key entry

Who owns /share/git?  What are the permissions of /share and of /share/git?
Note that Arch does not (by default) have a /share node so I assume you created it.   
Can git log in at the console of your computer?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2015-11-30 00:05:33

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: ssh access requires password despite present authorized key entry

You want to read up on 'ssh-agent' and 'ssh-add'.
Or you create a SSH key pair without a password.


1000

Offline

#4 2015-11-30 00:18:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,720

Re: ssh access requires password despite present authorized key entry

Wait.  Which is happening?  The ssh client cannot find the private key and is falling back to password? Or is the key is protected by a pass phrase?  I thought the former.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2015-11-30 04:23:21

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,238
Website

Re: ssh access requires password despite present authorized key entry

IlikePepsi wrote:
git clone git@my_machine:my_repo.git

but I get a password prompt for the git user.

Show us the full output of the command.

Offline

#6 2015-11-30 08:39:34

IlikePepsi
Member
Registered: 2013-10-29
Posts: 10

Re: ssh access requires password despite present authorized key entry

ewaller wrote:

Note that Arch does not (by default) have a /share node so I assume you created it.

Yes I created that node and I figured out that the share node had a wild sticky bit for group write permission which was inherited by the git directory. Apparently the ssh daemon doesn't like that due to it's "StrictModes yes" setting. I removed the sticky bit and everything was fine. I reproduced the behavior and took a look into the journal and it's also logged there. The log entry is "Authentication refused: bad ownership or modes for directory".

So the solution was easy thanks for all your time and help.

Offline

Board footer

Powered by FluxBB