In the following article we will explain how to SSH to a remote Linux VPS Server.
What is SSH?
How SSH works?
The basic principles of SSH is that it allows you to securely interact with remote linux servers, for example run a session, transfer a file, configure or install some service or whatever.
The command line tool used to connect to remote servers is called
ssh. Its basic usage is as follows:
remote_destination can be either an IP address or a hostname which resolves to the server’s IP address.
CONFIGURING SSH ON YOUR SERVER
SSH server configuration file is usually located in
/etc/ssh/sshd_config. To edit this configuration file you have to connect to your virtual server via SSH and use your favorite text editor to edit this configuration file, for example:
Few basic things to remember for the OpenSSH SSH daemon configuration file:
Port → Specifies the port number that sshd listens on. The default port is 22. ListenAddress → Specifies the local addresses sshd should listen on. PermitRootLogin → Specifies whether root can log in using ssh. AuthorizedKeysFile → Specifies the file that contains the public keys that can be used for user authentication.
Keep in mind that you need to restart your SSH server if you’ve done changes to this configuration file. It depends on the Linux distribution you run on your Linux VPS, but usually this can be done using:
service ssh restart
service sshd restart
systemctl restart sshd
CONNECTING VIA SSH USING *NIX
On a *NIX based machine, you can use your favorite terminal application to SSH to your virtual server. For example, let say your VPS hostname is
my-linux-vps.com and you like to login with your
root account, so you could do:
CONNECTING VIA SSH USING WINDOWS
In Windows, you can use a program called
Putty which you can download here. Once it’s downloaded, run it, and enter your VPS information as shown below: