SSH Configuration Passwordless

1
691

If you want to need passwordless SSH on Linux or Unix,you can do below steps.

rm -rf ./.ssh
mkdir .ssh
chmod 700 .ssh
chmod go-w $HOME
ssh-keygen -t rsa
Generating public/private rsa key pair. Please be patient….
Key generation may take a few minutes Enter file in which to save the key (/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again: Your identification has been saved in /oracle/.ssh/id_rsa.
Your public key has been saved in /oracle/.ssh/id_rsa.pub.
The key fingerprint is: d6:2b:74:0e:56:51:db:56:f5:54:30:09:38:86:ec:a8

scp /home/oracle/.ssh/id_rsa.pub oracle@server2:/data1/oracle/.ssh/id_rsa.pub_server1

cat $HOME/.ssh/id_rsa.pub_server1 >> $HOME/.ssh/authorized_keys

scp /data1/oracle/.ssh/id_rsa.pub oracle@server1:/home/oracle/.ssh/id_rsa.pub_server2

cat $HOME/.ssh/id_rsa.pub_server2 >> $HOME/.ssh/authorized_keys

1 COMMENT

Leave a Reply to Emre Cancel reply

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.