Home / Server / Linux / CentOS / How to Install and Configure OpenSSH in RHEL/CentOS Linux

How to Install and Configure OpenSSH in RHEL/CentOS Linux

How do i install and configure ssh server and client under Linux Operation System? Secure Shell (SSH) is a utility tool that implement the protocol. OpenSSH provides encrypted data connection between the two servers or computers using strong authentication over the insecure network such as internet.

The following two packages are needed to install the ssh.
1. OpenSSH-clients (acts as a remote client program)
2. OpenSSH-server (acts as a server which ensure secure encrypted communication)

NB: If you need to know more about vim editor, you may visit our another post – Vim Commands in RHEL/CentOS Linux for Beginners

Installation of OepnSSH:

To install server and client type the following command:

# yum install openssh-server openssh-clients -y

Start SSH Service:

# chkconfig sshd on
# service sshd start

Check ssh port 22 opened:

# netstat -tulpn | grep :22

If 22 port is block, allow 22 port from firewall:

# iptables -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT

Restart the SSH Service:

# service sshd restart

Configuration of OpenSSH:

SSH main installation directory:

# cd /etc/ssh/

First needed to backup the original file:

# cp /etc/ssh/sshd_config /etc/ssh/sshd_config.orig_copy

Edit the configuration file:

# vim /etc/ssh/sshd_config

To disable root logins, edit or add as follows:
PermitRootLogin no
Restrict login to user support only over ssh:
AllowUsers support

Save and close the file and Restart sshd:

# service sshd restart

Remove SSH:

# yum remove openssh-server openssh-clients -y
Red Hat, Inc. is an American multinational software company providing open-source software products to the
Post describes procedure to disable IPv6 on CentOS/RHEL 7. There are 2 ways to do
Are you a new Linux or Unix command line user? Are you configuring a DNS
Today i will show you how to install and configure DNS Server step by step.

About Shyamal

Avatar of Shyamal
Shyamal is our resident tutorial master. He has years of experience with WordPress Platform and is a professional blogger with a special interest in Social Media, Internet Marketing and Web Design. Actually, he is also working on a IT Company as a System Administrator in the fields of Linux and Windows Server, System Administration and Networking.

Check Also

rhel7 wmware configuration

VMware Workstation 11 Configuration before RHEL7 Installation

Hi Everyone. Again i come back with this new post. I’ve already got few email …

Leave a Reply

Your email address will not be published. Required fields are marked *

Advertisment ad adsense adlogger