SSH or secure shell service in Ubuntu allows a safe remote access while logging in. It also allows other network communications within an organization. To understand how to enable SSH in Ubuntu and Linux and use it like a pro, let us first understand what is SSH, how important it is and how we can enable it in Ubuntu and Linux.

What is SSH?

SSH is Secure Shell Service, a secure way or channel to access your hosting remotely. By using SSH, we are able to sift through our hosting file structure. By using SSH you can perform a list of tasks. Some of them include:

  • Live to monitor for log-files
  • Enabling or disabling services for VPS or Dedicated customers
  • Installing software to your account
  • Managing MySQL databases

Advantages of Installing SSH:

  • Allows tunneling of protocols like FTP
  • Allowing encryption of data so that malicious attackers are kept at bay
  • Protecting IP source routing from malicious users
  • Avoids DNS spoofing

How to enable SSH in Ubuntu and Linux

Ubuntu is a Linux OS that is available for community and professional support. Enabling SSH in
Ubuntu will provide remote access login along with other network communications. In order to enable SSH in Ubuntu, follow these steps

Open terminal with Ctrl+Alt+Del

Log into the Ubuntu server and run command studo apt-get install open ssh-server
Once OpenSSH server is installed, make a copy of the default SSH configuration to restore your backup.

Configuration of SSH

After installing SSH, you can enable the configuration by changing default port for security

reasons by disabling the “root” user login.In Order to update the default SSH port, open the SSH configuration file by running this command:

sudo nano /etc/ssh/sshd_configIncase you don’t have nano ( text editor installed) run:sudo apt-get install nano -y

After opening the file, find and change the following line from:
# Port 22 ( if it is your default or whichever may be in your case)
Port 1337 (You can use a port number of your choice)
Press Ctrl + W to save and close the file, then Y and press Enter to run.

Now, restart SSH after some time and run this command:

sudo service ssh restart

With this, you are all set to go. You can run SSH into your server by opening the terminal and using your user-id and password.

How to enable SSH in Linux

In order to enable SSH in Linux, follow these two simple steps:

Start by ensuring these configuration files to affirmative:
Configuration file /etc/ssh/sshd_config are set to yes:a) StrictModesb) Pubkey Authentication

Put SSH server daemon in running mode
In order to ensure that the SSH server is up and running in your Linux system, run the following commands:

$ /sbin/service sshd status (to check if it is running)

Incase the SSH server daemon sshd is not running, you can enable the daemon by the following command:

$ /sbin/service sshd start (to enable the daemon)

In this manner, you will easily enable SSH in Ubuntu and Linux. Hope these tips were helpful. In case you have any doubts or feedback for us, feel free to comment. We will make sure that we resolve them for you.

OpenSSH is a suite is based on SSH (Secure Shell) convention giving a protected system to administrations like remote login or remote record exchange. OpenSSH is otherwise called OpenBSD Secure Shell and was at first created as a piece of OpenBSD working framework.

What are the features of OpenSSH?

  1. OpenSSH is freely available for everyone, their code encourages reusing and auditing of the code.
  2. OpenSSH has a secure tunnel to forward remote TCP ports through strong encryption (3DES, Blowfish, AES, Arcfour).
  3. An ad hoc SOCKS (Secure Sockets) proxy server can be created using OpenSSH.
    OpenSSH provides secure communication.

Difference between SSH and OpenSSH

SSH is a closed source cryptographic network protocol. OpenSSH is a free open source protocol based on SSH.
SSH was first released in the year 1995 as SSH-1 protocol, trying to replace TELNET, rlogin, ftp and rsh protocols. OpenSSH was released in the year 1999, for developers wanting a free software version, the original 1.2.12 release of SSH was released under open source license.
<Some SSH commands are:
Ssh-keygen, ssh-copy-id, ssh-add, ssh-agent, scp, sftp and sshd
Some commands are:
ssh, ssh-keygen, ssh-agent, ssh-keyscan, scp, sftp and sshd


  • Root access to your server
  • Terminal (Linux)

How to enable OpenSSH on Servers:

In order to get SSH on the server, we need to run the OpenSSH package. For example, Apache is a package and the daemon is httpd. Similarly, OpenSSH is installed on the server and you use this via SSH. At ResellerBytes, OpenSSH is already installed and ready to use on all our Linux Hosting servers and Managed Servers and clients have a complete root access using it. And also Reseller Hosting as well as Shared Hosting.

Although OpenSSH comes pre-installed on various versions of Linux for both the client side as well as server side and is incorporated into many commercial products. However, if you still wish to check if it’s installed then we can run the following commands.

Using OpenSSH on Linux:

To install OpenSSH on Linux, we use Ubuntu as an Operating System on standalone PC.

For Ubuntu/Debian:

Step 1: To install OpenSSH on client side and server side

Type the following command in the terminal and wait till the packages are downloaded and installed.

sudo apt-get install -y openssh-server openssh-client

Step 2: Check if the service is running

Once OpenSSH has been installed you will need to check if the service is running properly or not, run the following command.

service sshd status

Step 3: Configuration

Before editing the configuration file, it is important that you make a copy of the original file in case of any mistake you can reuse this and have the proper settings in place.

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original-copy

I added the original-copy suffix, so every time I see this file I know it is an original copy of the sshd_config file.

Step 4: Connecting to OpenSSH

  1. By default the service runs on TCP port 22, you can change the port as such: Port 13
  2. To have sshd allow public key-based login, modify the following line:
    PubkeyAuthentication yesIf the line is already present, then make sure it has not been commented.
  3. Restart your OpenSSH server so that the changes in the config file can take place.

    sudo /etc/init.d/ssh restart

  4. If you want to have your OpenSSH server display a nice login banner, then you can do so by modifying the contents of the file by

    Banner /etc/


By following the above steps you have successfully learned how to use OpenSSH on Linux. You can read this post too, to know more about using SSH like a Pro.

Start building your website today!

Free Domain with Unlimited Hosting including Website Builder and Branded SSL

Only at $2.5/mo