Re: Key auth question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



2012/2/12 Jussi Hirvi <greenspot@xxxxxxxxxxxx>:
> I have a problem getting key authentication to work with one remote user
> (git), even though it works fine for the remote user "root". The remote
> file .ssh/authorized_keys is identical for both users - I cp'ed it from
> the root account to the git home dir.
>
> On local machine (OS X, by the way) I have:
> $ cd
> $ ls -l .ssh
> -rw-------  1 jussihirvi  staff   668 Aug 24 16:13 id_rsa
> (the rest is omitted)
>
> On remote machine (as root):
> $ cd
> $ ls -ld .ssh
> drwxr-xr-x 2 root root 4096 Feb 11 17:45 .ssh
> $ ls -l .ssh
> total 8
> -rw------- 1 root root 1768 Feb 11 17:45 authorized_keys
> -rw-r--r-- 1 root root  631 Feb 11 12:30 known_hosts
>
> On remote machine (as git):
> $ cd
> $ ls -ld .ssh
> drwxr-xr-x 2 git git 4096 Feb 12 11:15 .ssh
> $ ls -l .ssh
> total 8
> -rw------- 1 git git 1768 Feb 12 10:52 authorized_keys
> -rw-r--r-- 1 git git  631 Feb 12 11:05 known_hosts
>
> When, on local machine, I do:
>        $ ssh root@remotehost
> I get in without a password. But when I do
>        $ ssh git@remotehost
> I will be asked for a password.
>
> What should I check?

Check logs for sshd deamon first. It usually gives explanation about issue.

try also ssh -v git@remotehost for debug information.

--
Eero
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux