D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Key-based SSH login for non-interactive user?

 

On Tue, 2009-06-09 at 12:29 +0100, Grant Sewell wrote:
> Hi all,
>
> I'm having a bit of a dead-brain week this week.
>
> We're trying to setup key-based SSH logins for the Nagios service so it
> can monitor some of our other servers remotely via SSH.  I've setup
> key-based SSH logins on my home server, but that was for me... an
> interactive user account.  As I said, I'm having a bit of a dead-brain
> week (see me previous posts on other topics for confirmation of this)
> and I can't for the life of me think how to generate the RSA keys for
> the Nagios user account on the SSH client machine.

When you run ssh-keygen can't you choose where to save the two files?
Surely you can just save the id_dsa (or maybe id_rsa) file to the
correct place in the nagios user account?
Just make sure you have the right permission on the .ssh folder and the
file otherwise ssh might choose to ignore the key.

The id_[dr]sa.pub file contains the line you need to stick into
authorized_keys on the box you are automatically logging into.


Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 348 3873 20.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html