Skip to content

Open SSH connection on Linux

Last Updated on 14/11/2020

shell to open ssh connection on linux

This tutorial will show you how to open SSH connection on Linux directly on the console, so you don’t need to rely on third party software like Putty.

I’ve seen quite a few people relying on a Putty installation on Ubuntu and/or CentOS to access a remote server through SSH, but despite how good I think Putty is, its usage is far from necessary when you are on a Linux environment.

A Basic SSH

In order to SSH to a remote host or IP using the same username as the current one you are logged in, simply do the following:

# Using the hostname

# Using the IP

After the commands above are ran, you will probably be prompted to type the user’s password.

Specifying an username

It’s most likely that you would need to specify a different username to log into your remote host, so for an username called admin, do the following:


Using a different port than 22

The ssh command attempts to connect to the port 22 by default, if you need to connect to a different port like 2222, pass the -p parameter:

ssh -p 2222

Logging out

When you are done with the remote server, just type the command below to quit:


Hope it helps. Cya!


Leave a Reply

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