The security of your server is essential to your websites. In this article, we'll talk about how to increase the security of your server. Read this post for details: How to Setup Your Own VPS on Vultr
Use PuTTY, XShell or other SSH clients that you like to connect to your server. Here, I will use Xshell as an example. Your login information can be found on the server information page.
Open Xshell, a session window should pop up. Create a new session.
First, give it a name, it can be anything you want. And in the “Host”, Type in the IP address of your server. “Port Number” should be 22.
Then go to “Authentication” page, and type in your user name and password, they can be found on the server information page.
And now you should be able to connect to your server.
To make your server more secure, it’s better to use an SSH key to log in instead of passwords.
Go to Tools and choose “New User Key Wizard”.
Choose a key type and key length. Longer keys are more secure.
After it is generated, you can give it a name and a password.
Now, you need to save a public key and register it on your server.
Click on save as a file.
Go to the “root” directory of your server. If you installed Xftp and Xshell as a bundle, just click the green button on the top bar of Xshell.
Add an “.ssh” folder.
Copy the public key you just saved to this folder, and rename it
Restart ssh service.
sudo systemctl restart sshd
sudo service ssh restart
Now you should be able to log in to your server with the SSH key pair.
However, now you can still use your password to log in, which means the hackers can as well. So, you need to disable the password login.
Change the value to
Restart the ssh service again. Now you can only log in using the SSH key pair.