Operating System - Linux
1827810 Members
1864 Online
109969 Solutions
New Discussion

Re: Passwordless Logon With SSH...

 
SOLVED
Go to solution
Lee Harris_5
Valued Contributor

Passwordless Logon With SSH...

Hi, I'm trying to setup passwordless logon with SSH (sorry, if thats not the correct term, it probably isn't). I've done this in the past but can't remember how I did it now. I seem to remember generating an SSH key pair, and then adding the public key to the authorized keys file on the servers I wish to be able to logon to.

So basically, there is a central server where I have an ID. I want to be able to ssh to other servers on which I have an account from this point, and be connected without having to give my password...can anyone tell me how to do this?

Cheers - Lee
4 REPLIES 4
paolo barila
Valued Contributor
Solution

Re: Passwordless Logon With SSH...

Hi,
you can configure a publickey authentication with a null passphrase:

login IDA@SERVER1

SERVER1# ssh-keygen -t rsa -C "ssh_for_`whoami`@`hostname`" -f ~/.ssh/id_rsa
empty for no passphrase



SERVER1# cp -p id_rsa.pub authorized_keys.SERVER1
SERVER1# chmod 600 auth*
SERVER1# scp -p authorized_keys.SERVER1 SERVER2:/$PWD


login IDB@SERVER2

SERVER2# cat authorized_keys.SERVER1 >> authorized_keys
SERVER2# chmod 600 authorized_keys

IDA@SERVER1

SERVER1# ssh IDB@SERVER2
yes

(and viceversa)

Pablo
share share share
Asif Sharif
Honored Contributor

Re: Passwordless Logon With SSH...

Hi Harris,

This link will help you.
http://gentoo-wiki.com/SECURITY_SSH_without_a_password#Client_setup

Regards,
Asif Sharif
Regards,
Asif Sharif
Vipulinux
Respected Contributor

Re: Passwordless Logon With SSH...

Lee Harris_5
Valued Contributor

Re: Passwordless Logon With SSH...

Thanks. Now sorted.