LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   SSH2 RSA key based authentication (http://www.linuxquestions.org/questions/linux-server-73/ssh2-rsa-key-based-authentication-4175436137/)

acunacha 11-07-2012 02:38 PM

SSH2 RSA key based authentication
 
Hi,

I need to configure an RSA key based authentication scheme so that when an specific user (say jsmith) secure shells into S2 from S1 as jsmith that a password is not required, but only the pass-phrase of secret, could you please help me with that?

These are the steps that I normally follow:

1- ssh-keygen -t rsa (to create the key pair)
2- ssh-copy-id -i /root/.ssh/id_rsa.pub s2 (to deploy the public key)
I just then move to the other server, and perform steps 1 and 2, and then y deploy the pub key to the servers themselves.

However, i need to configure it as explained above, only for user jsmith.

Thanks in advance.

Diego

chrism01 11-07-2012 06:33 PM

Just do it as the user jsmith.

acunacha 11-07-2012 08:14 PM

Thanks for your reply Chris.

Mmm do you mean, run the commands I normally run but logged as jsmith? My bad, that sounds pretty obvious, I just did not think about it! :) I was running the commands as root and I donīt know why I was taking for granted that I was configuring ssh for the whole system!

Thank you very much Chris!

chrism01 11-08-2012 01:32 AM

Glad to help :)
Sometimes the obvious soln is just too easy to actually try ;)

Speaking of which, from the security point of view, try not to allow remote root access, even via ssh & auth-keys.
Its the first acct everyone goes for...

acunacha 11-08-2012 09:32 AM

Understood, thank you again Chris your help has been pretty useful! :D


All times are GMT -5. The time now is 05:24 PM.