Login SSH without password

Sometimes working on projects, you will have the need to login from this Linux machine to another Linux machine using SSH without having to enter a password to do some automated tasks as your needs, for example: copy a file … This tutorial, I would like to guide you to do this!

The condition is that the two machines have to install SSH 😀

Let’s say we have two virtual machines with the following IP addresses:

Login SSH without password


Login SSH without password

Now, I want from login to without having to enter a password, I will do the following:

First, on I will generate a public key and a private key using the ssh-keygen tool by entering the following terminal:


Login SSH without password

Then, I will copy the public key file id.rsa.pub which created in the ~/.ssh/ folder of machine to the machine using the ssh-copy-id tool by entering the command line:

In this example, I would enter the following:

Login SSH without password

That’s it, now to log into machine, I just enter:

Login SSH without password

Chia sẽ bài viết này ...Share on Facebook
0Tweet about this on Twitter
Share on LinkedIn

One thought on “Login SSH without password

  1. Pingback: Java ssh login

Add Comment