SlideShare a Scribd company logo
How To Install and Configure Open SSH Server on Ubuntu
i | P a g e
Table of Contents
Overview.......................................................................................................................................................1
Applies To......................................................................................................................................................1
Pre-requisites................................................................................................................................................1
Update System..........................................................................................................................................1
Pre-Install – Check Installation Status.......................................................................................................1
Install Package...............................................................................................................................................2
Post-Install – Verify Installation Status.....................................................................................................2
Post-Install - Listen Port............................................................................................................................3
Post-Install – Start Daemon – SSH ............................................................................................................4
Post-Install – Service Self-Test ..................................................................................................................4
Post-Install – Service Listening Status.......................................................................................................4
Self-Test Login to localhost (self)..........................................................................................................5
Configure Firewall – Open SSH Connection..............................................................................................5
Configure Firewall – Restart Service.....................................................................................................5
How To Install and Configure Open SSH Server on Ubuntu
1 | P a g e
Overview
In this guide we will go through the steps of installation and configuration of “OpenSSH Server”. In order
to connect to the Ubuntu host remotely and manage the server, openssh-server package has installed and
configured to accept connection.
By default only SSH client is installed to connect to a remote server (minimal install). If the server is
installed with full features enabled, then OpenSSH-server package is installed and enabled.
Applies To
Ubuntu 14.x, tested on Ubuntu 14.04 (minimal install)
Pre-requisites
 Internet connection to fetch and install packages.
 DHCP or static IP Address enabled or assigned host.
 system update.
 sudo or root access to the host.
Update System
First thing that you have to ensure that the system is updated with current patches installed. If the patches
are not installed, run the command; Boeing787$
apt-get -y update
Pre-Install – Check Installation Status
Before you install the package, check if the package is already installed on the server, run the command;
dpkg-query -l openssh*
or
dpkg-query -W --showformat='${Package}t ${Status}n' openssh-s*
How To Install and Configure Open SSH Server on Ubuntu
2 | P a g e
Install Package
If the package is not installed, next step is to install package “openssh-server”, to install the package run
the command;
apt-get install openssh-server
Post-Install – Verify Installation Status
After installation of the package, we can optionally, validate if the package is installed, to check package
“openssh-server” installation status, run the command;
dpkg-query -l openssh-server
dpkg-query -W --showformat='${Package}t ${Status}n' openssh-s*
How To Install and Configure Open SSH Server on Ubuntu
3 | P a g e
Post-Install - Listen Port
Before you start the ssh daemon, you need configure ssh service open the configuration file and
uncomment the port configuration. By default its disabled to listen on any port.
gedit /etc/ssh/ssh_config
Modify port attribute, which will enable the service to listen on port “22” which is also default port for ssh
service as below;
Port 22
After the service restart, this modification will cause ssh service to listen on port 12345 and to connect
from a remote host run command you have to explicitly specify port attribute value “ssh -P 12345
hostname”
How To Install and Configure Open SSH Server on Ubuntu
4 | P a g e
Post-Install – Start Daemon – SSH
After configuring the service, next thing is to start ssh service (start the daemon), run the command;
/etc/init.d/ssh start
Post-Install – Service Self-Test
Also, you could do a self-test SSH connectivity of hostname to ensure service is accessible from localhost
as well as external network, if needed, to do a self-test run the command;
telnet `hostname` 22
Post-Install – Service Listening Status
To check if the service is listening, you can also validate it by running the below command; if the “Local
Address:Port” displays “*:22” then the service will accept connections from anywhere.
sudo ss -lnp | grep -E ':22' | grep 'sshd'
How To Install and Configure Open SSH Server on Ubuntu
5 | P a g e
Self-Test Login to localhost (self)
To test ssh connection for the server, run the command.
ssh -v localhost or ssh localhost
Configure Firewall – Open SSH Connection
In case your firewall is configured to blocked SSH connection, to allow firewall to ssh connection, run the
command;
ufw allow ssh
Configure Firewall – Restart Service
Optionally, you can restart firewall service, run the command;
service ufw restart

More Related Content

What's hot (20)

PDF
How To Install and Configure Screen on CentOS 7
VCP Muthukrishna
 
PDF
How to Install MariaDB Server or MySQL Server on CentOS 7
VCP Muthukrishna
 
PDF
How to Upgrade Openfire on CentOS 7
VCP Muthukrishna
 
PDF
How To Protect SSH Access with Fail2Ban on RHEL 7
VCP Muthukrishna
 
PDF
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
VCP Muthukrishna
 
PDF
How To Configure Amazon EC2 Load Balancer
VCP Muthukrishna
 
PDF
How To Connect Amazon AWS EC2 with Key Pair – Linux
VCP Muthukrishna
 
PDF
Install VMWare Tools CentOS 7
VCP Muthukrishna
 
PDF
How To Configure FirewallD on RHEL 7 or CentOS 7
VCP Muthukrishna
 
PDF
How To Configure SNMP Logging on RHEL 7
VCP Muthukrishna
 
PDF
How To Disable IE Enhanced Security Windows PowerShell
VCP Muthukrishna
 
PDF
How To Configure Apache VirtualHost on RHEL 7 on AWS
VCP Muthukrishna
 
PDF
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
VCP Muthukrishna
 
PDF
How To Install and Configure AWS CLI on RHEL 7
VCP Muthukrishna
 
PDF
How To Install and Use ABRT CLI on RHEL 7
VCP Muthukrishna
 
PDF
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
VCP Muthukrishna
 
PDF
How To Configure Amazon EC2 Security Groups
VCP Muthukrishna
 
PDF
How To Install OpenFire in CentOS 7
VCP Muthukrishna
 
PDF
TFTP Installation Configuration Guide
VCP Muthukrishna
 
PDF
How To Install and Configure Salt Master on Ubuntu
VCP Muthukrishna
 
How To Install and Configure Screen on CentOS 7
VCP Muthukrishna
 
How to Install MariaDB Server or MySQL Server on CentOS 7
VCP Muthukrishna
 
How to Upgrade Openfire on CentOS 7
VCP Muthukrishna
 
How To Protect SSH Access with Fail2Ban on RHEL 7
VCP Muthukrishna
 
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
VCP Muthukrishna
 
How To Configure Amazon EC2 Load Balancer
VCP Muthukrishna
 
How To Connect Amazon AWS EC2 with Key Pair – Linux
VCP Muthukrishna
 
Install VMWare Tools CentOS 7
VCP Muthukrishna
 
How To Configure FirewallD on RHEL 7 or CentOS 7
VCP Muthukrishna
 
How To Configure SNMP Logging on RHEL 7
VCP Muthukrishna
 
How To Disable IE Enhanced Security Windows PowerShell
VCP Muthukrishna
 
How To Configure Apache VirtualHost on RHEL 7 on AWS
VCP Muthukrishna
 
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
VCP Muthukrishna
 
How To Install and Configure AWS CLI on RHEL 7
VCP Muthukrishna
 
How To Install and Use ABRT CLI on RHEL 7
VCP Muthukrishna
 
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
VCP Muthukrishna
 
How To Configure Amazon EC2 Security Groups
VCP Muthukrishna
 
How To Install OpenFire in CentOS 7
VCP Muthukrishna
 
TFTP Installation Configuration Guide
VCP Muthukrishna
 
How To Install and Configure Salt Master on Ubuntu
VCP Muthukrishna
 

Similar to How To Install and Configure Open SSH Server on Ubuntu (20)

PPSX
Linux02 install SSh
Jainul Musani
 
PPTX
Telnet & SSH Configuration
Vinod Gour
 
PDF
IBM Ported Tools for z/OS: OpenSSH User's Guide
IBM India Smarter Computing
 
DOCX
Cent os 5 ssh
Alejandro Besne
 
PDF
SSH.pdf
AnisSalhi3
 
PPT
Introduction to SSH
Hemant Shah
 
PDF
0696-ssh-the-secure-shell.pdf
AnasElbaz
 
ODP
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
Nagios
 
TXT
Linuxserver harden
Gregory Hanis
 
PDF
How to install Setup & Configure SSH Jump Server on a Linux box
Ezee Login
 
PDF
Slides null puliya linux basics
Anant Shrivastava
 
PPTX
Lecture6_Linux network for students .pptx
IslamReda28
 
PPTX
Step by step procedure to set up a
Ruchiseo
 
PDF
Ubuntu server-904 membuat-server_dengan_ubuntu
Raden Ozan
 
PPSX
Linux: An Unbeaten Empire
Yogesh Sharma
 
PDF
OpenSSH tricks
Assem CHELLI
 
PDF
karthi.pdfvhhhhhgffghhugdsddffghuujjjh.ppt
akashsachu221
 
PDF
Simran_Kaur
Simran Kaur
 
PDF
linux installation.pdf
MuhammadShoaibHussai2
 
PDF
OpenSSH: keep your secrets safe
Giovanni Bechis
 
Linux02 install SSh
Jainul Musani
 
Telnet & SSH Configuration
Vinod Gour
 
IBM Ported Tools for z/OS: OpenSSH User's Guide
IBM India Smarter Computing
 
Cent os 5 ssh
Alejandro Besne
 
SSH.pdf
AnisSalhi3
 
Introduction to SSH
Hemant Shah
 
0696-ssh-the-secure-shell.pdf
AnasElbaz
 
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
Nagios
 
Linuxserver harden
Gregory Hanis
 
How to install Setup & Configure SSH Jump Server on a Linux box
Ezee Login
 
Slides null puliya linux basics
Anant Shrivastava
 
Lecture6_Linux network for students .pptx
IslamReda28
 
Step by step procedure to set up a
Ruchiseo
 
Ubuntu server-904 membuat-server_dengan_ubuntu
Raden Ozan
 
Linux: An Unbeaten Empire
Yogesh Sharma
 
OpenSSH tricks
Assem CHELLI
 
karthi.pdfvhhhhhgffghhugdsddffghuujjjh.ppt
akashsachu221
 
Simran_Kaur
Simran Kaur
 
linux installation.pdf
MuhammadShoaibHussai2
 
OpenSSH: keep your secrets safe
Giovanni Bechis
 
Ad

More from VCP Muthukrishna (17)

PDF
How to Fix Duplicate Packages in YUM on CentOS 7
VCP Muthukrishna
 
PDF
How To Connect to Active Directory User Validation
VCP Muthukrishna
 
PDF
How To Connect To Active Directory PowerShell
VCP Muthukrishna
 
PDF
How To List Files on Remote Server - PowerShell
VCP Muthukrishna
 
PDF
How To List Files and Display In HTML Format
VCP Muthukrishna
 
PDF
How To Check and Delete a File via PowerShell
VCP Muthukrishna
 
PDF
How To Setup SSH Keys on CentOS 7
VCP Muthukrishna
 
PDF
Windows PowerShell Basics - How To List PSDrive Info
VCP Muthukrishna
 
PDF
How To List Nginx Modules Installed / Complied on CentOS 7
VCP Muthukrishna
 
PDF
Windows PowerShell Basics – How To Create powershell for loop
VCP Muthukrishna
 
PDF
How To Construct IF and Else Conditional Statements
VCP Muthukrishna
 
PDF
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
VCP Muthukrishna
 
PDF
How To Create Power Shell Function Mandatory Parameter Value
VCP Muthukrishna
 
PDF
How To Create PowerShell Function
VCP Muthukrishna
 
PDF
How To Find Package Installation Date on RHEL 7
VCP Muthukrishna
 
PDF
How To Reset root Password on CentOS 7
VCP Muthukrishna
 
PDF
How To View Current Execution Policy PowerShell
VCP Muthukrishna
 
How to Fix Duplicate Packages in YUM on CentOS 7
VCP Muthukrishna
 
How To Connect to Active Directory User Validation
VCP Muthukrishna
 
How To Connect To Active Directory PowerShell
VCP Muthukrishna
 
How To List Files on Remote Server - PowerShell
VCP Muthukrishna
 
How To List Files and Display In HTML Format
VCP Muthukrishna
 
How To Check and Delete a File via PowerShell
VCP Muthukrishna
 
How To Setup SSH Keys on CentOS 7
VCP Muthukrishna
 
Windows PowerShell Basics - How To List PSDrive Info
VCP Muthukrishna
 
How To List Nginx Modules Installed / Complied on CentOS 7
VCP Muthukrishna
 
Windows PowerShell Basics – How To Create powershell for loop
VCP Muthukrishna
 
How To Construct IF and Else Conditional Statements
VCP Muthukrishna
 
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
VCP Muthukrishna
 
How To Create Power Shell Function Mandatory Parameter Value
VCP Muthukrishna
 
How To Create PowerShell Function
VCP Muthukrishna
 
How To Find Package Installation Date on RHEL 7
VCP Muthukrishna
 
How To Reset root Password on CentOS 7
VCP Muthukrishna
 
How To View Current Execution Policy PowerShell
VCP Muthukrishna
 
Ad

Recently uploaded (20)

PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 

How To Install and Configure Open SSH Server on Ubuntu

  • 1. How To Install and Configure Open SSH Server on Ubuntu i | P a g e Table of Contents Overview.......................................................................................................................................................1 Applies To......................................................................................................................................................1 Pre-requisites................................................................................................................................................1 Update System..........................................................................................................................................1 Pre-Install – Check Installation Status.......................................................................................................1 Install Package...............................................................................................................................................2 Post-Install – Verify Installation Status.....................................................................................................2 Post-Install - Listen Port............................................................................................................................3 Post-Install – Start Daemon – SSH ............................................................................................................4 Post-Install – Service Self-Test ..................................................................................................................4 Post-Install – Service Listening Status.......................................................................................................4 Self-Test Login to localhost (self)..........................................................................................................5 Configure Firewall – Open SSH Connection..............................................................................................5 Configure Firewall – Restart Service.....................................................................................................5
  • 2. How To Install and Configure Open SSH Server on Ubuntu 1 | P a g e Overview In this guide we will go through the steps of installation and configuration of “OpenSSH Server”. In order to connect to the Ubuntu host remotely and manage the server, openssh-server package has installed and configured to accept connection. By default only SSH client is installed to connect to a remote server (minimal install). If the server is installed with full features enabled, then OpenSSH-server package is installed and enabled. Applies To Ubuntu 14.x, tested on Ubuntu 14.04 (minimal install) Pre-requisites  Internet connection to fetch and install packages.  DHCP or static IP Address enabled or assigned host.  system update.  sudo or root access to the host. Update System First thing that you have to ensure that the system is updated with current patches installed. If the patches are not installed, run the command; Boeing787$ apt-get -y update Pre-Install – Check Installation Status Before you install the package, check if the package is already installed on the server, run the command; dpkg-query -l openssh* or dpkg-query -W --showformat='${Package}t ${Status}n' openssh-s*
  • 3. How To Install and Configure Open SSH Server on Ubuntu 2 | P a g e Install Package If the package is not installed, next step is to install package “openssh-server”, to install the package run the command; apt-get install openssh-server Post-Install – Verify Installation Status After installation of the package, we can optionally, validate if the package is installed, to check package “openssh-server” installation status, run the command; dpkg-query -l openssh-server dpkg-query -W --showformat='${Package}t ${Status}n' openssh-s*
  • 4. How To Install and Configure Open SSH Server on Ubuntu 3 | P a g e Post-Install - Listen Port Before you start the ssh daemon, you need configure ssh service open the configuration file and uncomment the port configuration. By default its disabled to listen on any port. gedit /etc/ssh/ssh_config Modify port attribute, which will enable the service to listen on port “22” which is also default port for ssh service as below; Port 22 After the service restart, this modification will cause ssh service to listen on port 12345 and to connect from a remote host run command you have to explicitly specify port attribute value “ssh -P 12345 hostname”
  • 5. How To Install and Configure Open SSH Server on Ubuntu 4 | P a g e Post-Install – Start Daemon – SSH After configuring the service, next thing is to start ssh service (start the daemon), run the command; /etc/init.d/ssh start Post-Install – Service Self-Test Also, you could do a self-test SSH connectivity of hostname to ensure service is accessible from localhost as well as external network, if needed, to do a self-test run the command; telnet `hostname` 22 Post-Install – Service Listening Status To check if the service is listening, you can also validate it by running the below command; if the “Local Address:Port” displays “*:22” then the service will accept connections from anywhere. sudo ss -lnp | grep -E ':22' | grep 'sshd'
  • 6. How To Install and Configure Open SSH Server on Ubuntu 5 | P a g e Self-Test Login to localhost (self) To test ssh connection for the server, run the command. ssh -v localhost or ssh localhost Configure Firewall – Open SSH Connection In case your firewall is configured to blocked SSH connection, to allow firewall to ssh connection, run the command; ufw allow ssh Configure Firewall – Restart Service Optionally, you can restart firewall service, run the command; service ufw restart