How to SSH Login Without Password

Valic —  June 17, 2010 — Leave a comment

The following steps can be used to ssh from one system to another without specifying a password.

Step 1. On the client run the following commands:

ssh-keygen -t rsa

The output will look like this:

root@client:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/
The key fingerprint is:
cd:1c:6b:4e:01:1d:8c:02:40:24:24:95:02:dc:12:7f root@CSG

Step 2. Now run the following commands:

ssh root@server mkdir -p .ssh

You will prompted for the password.

Step 3.Now run:

cat .ssh/ | ssh root@server ‘cat >> .ssh/authorized_keys’

You will prompted for the password again.

From now on you can log into B as b from A as a without password.



Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

No Comments

Be the first to start the conversation.

Leave a Reply

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