Passwordless SSH – Everything You Need to Know

In this article, I am going to give you the complete guide on how to login to a VPS server without using a password, aka a passwordless SSH login.

Even though it seems insignificant at first glance, using this method as an alternative way to log in to your VPS Server is actually quite convenient.

As mentioned before, passwordless SSH is that the ability to access a Linux server (VPS) while not the requirement to enter a password. It is an excellent method to get quick access to your server.

While login without password looks like a giant security threat, SSH is incredibly secure.It’s a SSH key-based authentication methodology that has a strong encryption and is nearly not possible to breach.

Moreover, SSH (Secure Shell) is that the most trusted protocol to log into remote servers to run commands and programs.It is  additionally  used to transfer files from one computer to another via a network using the Secure Copy Protocol (SCP).

Nonetheless,despite the system, selecting a fast and reliable VPS server should always become your first priority.

After all, using a passwordless SSH would still take quite your time if your server is slow to respond and somewhat unreliable.

How to Start Using Passwordless SSH on Linux?

Enabling Passwordless SSH on a Linux Virtual Private Server isn’t as difficult as you might think.Here are the complete steps to do it:

1. Access Your Server

First of all, you need to use regular SSH to access your Server.To do this, you can enter a command below:

ssh root@123.12.123.12

ssh–the command that must be entered into the terminal, or PuTTY if you’re running a Windows-based machine.
root – your username
123.12.123.12 – your server’s IP address

To generate an SSH key pair that you will need to log in, you need to use this command line:

Keep in mind that the comment is used as a custom note to help you to identify the key.

Since there is a possibility that you will use more than one pair of key, this note would help you to remember each SSH key you have generated.

Now, you need to determine where to save the key.

The default location usually is /home/username/.ssh/id_rsa, but you can choose other places to save them to keep secure.

Moreover, there is an optional step to enter a password.

However, I will not use it since I am tutoring you on how to set up passwordless SSH.

Moving the public key is easier if you use the same computer that you just can use to access the server terminal.

This time,, we have a tendency to use the ssh-copy-id command.

You just need to input this command line:

Now, you have to enter the password of your VPS username.

When It’s done, copy the SSH key and the connection should be terminated.

If you encounter an error, try using this command line:

Furthermore, for those of you who have already connected to a networked Mac, you can also use Finder.

Leave a Comment

Share via
Copy link
Powered by Social Snap