How to install ssh server on Ubuntu

SSH, the abbreviation is Secure Shell. It is a software program use the secure shell protocol to accept connection from remote computers.SSH is TCP based protocol.
By default the ssh protocol listen at port no. 22 . You can also customize the port number but always remember while changing the ssh port no. it should be above 1024 and not to be conflicted with same port number.
(Read: change SSH port number)

Without installing SSH server, you can not connect with following protocols into system

  • SFTP
  • SCP
  • SSH

There are many SSH servers software program exists.(List of SSH Servers)
In Debian based Operating System, default SSH server package is OpenSSH . The OpenSSH project is part of OpenBSD . Yes, you heard right ,it is the same team which are behind the awesome operating system called OpenBSD. The OpenBSD team are great in encryption and cryptography.

Installing OpenSSH Server on Ubuntu

To install OpenSSH server on Ubuntu is very easy. We will use the apt command to install the SSH server

sudo apt-get install openssh-server

start/stop/restart the ssh service

To start/stop/restart the ssh service, use the given below command.

Start:

sudo service ssh start

Stop:

sudo service ssh stop

Restart:

sudo service ssh restart

The main configuration files are located in directory path /etc/ssh
The sshd_config and ssh_config are main configuration file.

Now from client side, we can connect to SSH Server.

In linux/Mac/Other Unix Operating System, use the command ssh username@ip-address-OR-FQDN
In Windows, you can use very popular tool called putty .

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.