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.
- We have a newly installed Ubuntu Server 16.04.2 in this Scenario.
- 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.
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 firstname.lastname@example.org
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.
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.