SSH: Remote Login without Password

If you work with a large number of Linux terminals & had difficulties to remember each console password, then you can keep this trick. Connecting to a remote method using SSH (Secure SHell) will prompt you a password screen before attempting to login into target host. Below procedure has the same mechanism with FTP auto connect using .netrc files like I had described earlier. The main similarity tricks is creating a file contains identity information or something like that. The difference is, you have to store the identity SSH file to the remote machine.

First of all, on your own computer, create a public key identification by generating manually from ssh-keygen command like below:

[root@tuxbook ~]# ssh-keygen
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:

After it executed successfully, it will generated a file named under /root/.ssh directory. Copy this file by giving a new name with authorized_keys.

[root@tuxbook ~]# cp /root/.ssh/ /root/.ssh/authorized_keys

Put this latest file into target machine in the same directory. That’s all. The next time you try to connect to remote host, it will always accepting you to log on since your computer identification have been recognized by authorized_keys file in the remote host. No passwords prompting on your screen anymore.

Keep this trick carefully & don’t let anyone touch your terminal because it has unlimited access to control the servers you had made after login with SSH. Cheers…

Labels: ,


Eko Wahyudiharto
PS: If you've benefit from this blog,
you can support it by making a small contribution.

Enter your email address:

Delivered by FeedBurner

Post a Comment Bookmark and Share


Post a Comment

Leave comments here...