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)

PDF
How To Install and Configure Splunk on RHEL 7 in AWS
VCP Muthukrishna
 
PDF
How To Install CentOS 7
VCP Muthukrishna
 
PDF
Howto: Install openQRM 5.1 on Debian Wheezy
openQRM Enterprise GmbH
 
DOCX
Cent os 5 ssh
Alejandro Besne
 
PDF
How to install Setup & Configure SSH Jump Server on a Linux box
Ezee Login
 
PDF
Ftp configuration in rhel7
Balamurugan M
 
PDF
Ajenti control panel
chacheng_dbl
 
PDF
Ajenti control panel
chacheng_dbl
 
PDF
Ajenti control panel
Chacheng Oo
 
PDF
Ajenti control panel
chacheng oo
 
PDF
VMWare Tools Installation and Troubleshooting Guide
VCP Muthukrishna
 
PPTX
How to setup OpenVPN Server and Client on Ubuntu 14.04
VEXXHOST Private Cloud
 
PPTX
Java App On Digital Ocean: Deploying With Gitlab CI/CD
Seun Matt
 
PDF
How install nagios in ubuntu 15.04, 16.04
Vanda KANY
 
PDF
L.A.M.P Installation Note --- CentOS 6.5
William Lee
 
PPTX
Installaling Puppet Master and Agent
Ranjit Avasarala
 
DOCX
Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...
JohnWilson47710
 
PDF
How To Configure VNC Server on CentOS 7
VCP Muthukrishna
 
PDF
Install SSH Server on Windows 2008 R2
VCP Muthukrishna
 
DOCX
Kickstart
Dhananjayan Ezhumalai
 
How To Install and Configure Splunk on RHEL 7 in AWS
VCP Muthukrishna
 
How To Install CentOS 7
VCP Muthukrishna
 
Howto: Install openQRM 5.1 on Debian Wheezy
openQRM Enterprise GmbH
 
Cent os 5 ssh
Alejandro Besne
 
How to install Setup & Configure SSH Jump Server on a Linux box
Ezee Login
 
Ftp configuration in rhel7
Balamurugan M
 
Ajenti control panel
chacheng_dbl
 
Ajenti control panel
chacheng_dbl
 
Ajenti control panel
Chacheng Oo
 
Ajenti control panel
chacheng oo
 
VMWare Tools Installation and Troubleshooting Guide
VCP Muthukrishna
 
How to setup OpenVPN Server and Client on Ubuntu 14.04
VEXXHOST Private Cloud
 
Java App On Digital Ocean: Deploying With Gitlab CI/CD
Seun Matt
 
How install nagios in ubuntu 15.04, 16.04
Vanda KANY
 
L.A.M.P Installation Note --- CentOS 6.5
William Lee
 
Installaling Puppet Master and Agent
Ranjit Avasarala
 
Installation And Configuration Of DNS, Web And FTP Servers On Virtual Machine...
JohnWilson47710
 
How To Configure VNC Server on CentOS 7
VCP Muthukrishna
 
Install SSH Server on Windows 2008 R2
VCP Muthukrishna
 
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)

PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PPTX
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PDF
Next level data operations using Power Automate magic
Andries den Haan
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
Next level data operations using Power Automate magic
Andries den Haan
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 

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