How to connect to SSH with Linux?

By Aina Manoa Ratefiarison • Posted on 27 March 2019

How to connect to SSH with Linux?

SSH is the main gateway to your server management. Here you can install and configure every services you need to be running on your server.


In order to practice this tutorial, you need :

Step 1: install OpenSSH client

Before connecting to any Secure SHell host, you need to have an SSH client. Most installation should already bring OpenSSH client but to make sure to have it, we can try to install it.

Debian, Ubuntu (and other similar distributions)$ sudo apt-get install openssh-client

CentOS and RHEL based distributions$ sudo yum install openssh-client

Step 2: Connect to SSH

To connect to a remote server, open a terminal and write to following command:$ ssh user@host

Here, I’m connecting with the user user to the server host.

The host can be an IPv4 address, IPv6 address or a hostname. So, to connect as root to the server (, we should write:$ ssh

or$ ssh root@

If you connect for the first time to this server, your computer will show the server fingerprint and ask you to confirm it. Just type yes.

Step 3: Log out with SSH

When you did everything you want, you should close your session. To do that, write exit inside your session:$ exit
Connection to closed.

Leave a Reply

Your email address will not be published. Required fields are marked *