If you are a network administrator you must be know about the remote login protocol such as telnet, rlogin, and ssh. This quick tutorial is going to show you how to install and enable SSH (Secure Shell) service in Debian/Ubuntu, also this tutorial works with other linux distribution that based on Debian or Ubuntu.

SSH (Secure Shell) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers. SSH is a replacement for telnet, because telnet is very insecure. Telnet sends traffic with plain text, SSH uses a secure protocol to communicate.

In this post I will focused only for OpenSSH. OpenSSH is a free and open source set of computer programs that provides encrypted communication sessions over a computer network using the SSH protocol. OpenSSH is developed as part of OpenBSD.

To install and enable OpenSSH in Debian/Ubuntu, Just follow the steps below.

Step 1

Install OpenSSH

Open your terminal by pressing CTRL + ALT+ T, or open it by clicking on the icon and type and run the command below to install openssh-server.

$ sudo apt-get install openssh-server

Step 2

Configure OpenSSH

After installation your clients are ready to connect to your SSH server by using the default port 22. If you want to change the default port, open the configuration files with this command.

$ sudo nano /etc/ssh/sshd_config
Enable SSH Secure Shell in Ubuntu Debian
Enable SSH Secure Shell in Ubuntu Debian

Change the port on Line 5, like on the screenshot

If you wish, you also can change settings for root remote login.

Enable SSH Secure Shell in Ubuntu Debian - 2
Enable SSH Secure Shell in Ubuntu Debian – 2

Step 3

Restart SSH Service

Finally after change some settings for your OpenSSH Server, you must restart the server to make changes. To restart run the command below :

$ sudo /etc/init.d/ssh restart

Step 4

Test your SSH Connection

After everything is setup, now test with your SSH to make sure that your configuration is ready.

Enable SSH Secure Shell in Ubuntu Debian -3
Enable SSH Secure Shell in Ubuntu Debian -3

Enjoy !.


You can do many things with OpenSSH, Like DenyHost, Disable the root login, or Display some cool banner when you login to your ssh server, etc. So have an experiment with OpenSSH !.

That’s all for my quick tutorial on how to install and enable to SSH server in Debian/Ubuntu. Hope this quick tutorial can be useful for you. Comments and suggestion are always welcome !. Thank You !

Leave a Reply

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