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.

Read more

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.

Requirements

In order to practice this tutorial, you need :

  • A running desktop Linux computer (any Linux distribution should be fine)
  • A running VPS or Dedicated Server
  • Internet connection

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)


[email protected]$ sudo apt-get install openssh-client

CentOS and RHEL based distributions


[email protected]$ sudo yum install openssh-client

Step 2: Connect to SSH

To connect to a remote server, open a terminal and write to following command:


[email protected]$ ssh [email protected]

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 demo40.hostibox.com (10.0.40.1), we should write:


[email protected]$ ssh [email protected]

or


[email protected]$ ssh [email protected]

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:


[email protected]$ exit
logout
Connection to demo40.hostibox.com closed.

Leave a Reply

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