[CentOS] SSH Automatic Log-on Failure - Centos 5.5

Nico Kadel-Garcia nkadel at gmail.com
Thu Jan 27 07:48:27 UTC 2011


On Thu, Jan 27, 2011 at 2:46 AM, Nico Kadel-Garcia <nkadel at gmail.com> wrote:
> On Thu, Jan 27, 2011 at 2:35 AM, Cameron Kerr <cameron at humbledown.org> wrote:
>>
>> On 27/01/2011, at 7:45 PM, Always Learning wrote:
>>
>>> Hallo,
>>>
>>> I wanted to avoid typing-in my password every occasion I remotely
>>> logged-on to a server.
>>>
>>> I created my SSH keys and copied the public part to the server and
>>> renamed it authorized_keys.
>>
>>
>>> ---------------------------------------------
>>>
>>> server /root/.ssh
>>>
>>> id_rsa.authorized_keys  -rw--------
>>>
>>> --------------------------------------------
>>
>> Your ~/.ssh/authorized_keys needs to be readable by sshd, your permissions on it are too restrictive (typically, this should be 0644)
>
> No, 0600 is *fine* In fact that is the recommended permission from the
> man page for "ssh". OpenSSH does a bit of UID and EUID manipulation to
> gain permissions to examine that file as the user whose login is being
> attempted, precisely to deal with NFS mounted home directories which
> do not allow "root" direct access to protected files.

But, the name of the file with a copy of your public key should be
$HOME/.ssh/authorized_keys. And the permissions of $HOME/.ssh should
be 0700.



More information about the CentOS mailing list