SSH setup in a newly installed Ubuntu 16.04.2 server

Secure Shell(SSH) is a protocol used to login securely from a remote host to other over a unsecured network. The password will be Encrypted when trying to login to a remote host.


  1. We have a newly installed Ubuntu Server 16.04.2 in this Scenario.
  2. A host machine from where we are trying to access the remote machine.


In this Scenario we have a MAC OSX host from which we are trying to access a remote Ubuntu Server through Terminal.

1.Perform update on the server.

apt-get update

2. Install Open SSH-server by typing the following command,

sudo apt-get install openssh-server

3. Open a terminal and enter, ssh username@hostname or ssh username@hostip in order to connect to the Ubuntu Server.

Example: ssh serveradmin@192.168.x.x

A connection is now established to the Server.


If SSH not installed, below are the error message you get when you try to ssh to the server.

1 .”ssh: connect to host hostname.tld port 22: Connection refused

2. when trying to check sshd service by command ,service sshd status ; you get “Status: unrecognised service”. This states that the service is not installed.



Leave a Reply