Enable SSH (Secure Shell) in Ubuntu 14.04 ( Trusty Tahr)

by kartook on August 19, 2014

Sponsored Links

Enable SSH (Secure Shell) in Ubuntu 14.04 ( Trusty Tahr) -How-to-Guide

This tutorial shows you how to enable SSH in Ubuntu 14.04 ( Trusty Tahr) you may already know, SSH is a secure communication protocol that lets you remotely access to our Linux and Unix based systems. SSH is a replacement for Telnet.Telnet is very unsecured.Telnet sends traffic in plain text,which you can easily capture via packet capturing tools like Wireshark and many more. SSH on uses a secure protocol to communicate remote server.

Intention :

  1. Update Ubuntu
  2. Install and enable Openssh
  3. Custom port configuration
  4. Restart the Openssh service
  5. Connect via putty

open Terminal from Keys press Ctrl – Alt – T on your keyboard or open terminal in GUI ( Graphical user interface )

A

 

 

When it opens, run the commands below to update the server.This update makes all packages and required security updates .

sudo apt-get install update

B

 

 

 

After server update Run the commands below to install Openssh-server package .

 sudo apt-get install openssh-server

C

 

 

 

Walla !!!! .openssh-Server Installation Done. Now you can use your favorite SSH client  to connect to your machine using the default port 22.Before that you need to find your IPAddress of the server to run  below command on terminal .

ifconfig

D

 

 

 

 

 

 

My Remote Server IPAddress is 192.168.204.133 as above i found via ifconfig comment through terminal .I am connecting server via port 22 as below .with my favorite terminal clientPuTTy.

E

 

 

 

 

White the first time remote  connect you need to accept Server RSAv2 Key Fingerprint to trust the remote host . You have select ” Yes”

FF

 

 

 

 

 

 

 

After Connect the server you will get a Server information  like Ubuntu version ,Documentation Url  and Last Login information ( if you logged in before ) As like below .

F

 

 

 

 

I always wish to change the connection port for security reasons in different port.To change the default port ( 22 ) to custom port run below command  to open the configuration file on server .

sudo gedit /etc/ssh/sshd_config 

If you use gedit simply edit the port and save it .

or

sudo nano /etc/ssh/sshd_config

[ If nano editor is not install please install sudo apt-get install nano ]

 

If you use Nano editor you have to follow the steps .

Port

 

 

 

 

 

After editing the you need to pass Control+O to write Out your changed on the file .

edit1

 

 

After That you need to enter and accept  the changes .

edit2

 

 

Wallaa!!!! We are done .My Favorite ssh client,if you like you can download from Here

Congratulations, you have just Installed and Enabled Secure SSH  !!!

Kartook - who has written 769 posts on Technical Notes Tweaks.

Follow him on Twitter @kartook and on Google+

Previous post:

Next post:

Leave a Comment