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.
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
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
Change the port on Line 5, like on the screenshot
If you wish, you also can change settings for root remote login.
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
Test your SSH Connection
After everything is setup, now test with your SSH to make sure that your configuration is ready.
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 !