Ssh Configuration in Centos/RHEL Step By Step

Ssh Configuration in Centos/RHEL Step By Step:

Open ssh is the package that handles ssh service in centos 7 and red hat/RHEL 7. To configure ssh we need to install openssh package in our server. First verify is openssh is installed in our sever or not?, by using below command. This command will show you the list of installed packages for openssh.

rpm -qa openssh*

Install Openssh:

If you have not installed yet,install the openssh with below yum command.

yum install -y openssh*

Start the Sshd Service:

sshd is the daemon taht handles the ssh service in centos/redhat/rhel

Start the sshd service in server by using below systemctl command.

systemctl start sshd

To Automatically Start Ssh On Boot:

systemctl enable sshd

By enabling the sshd service,sshd service will automatically start on boot.

Add Ssh Service To Firewall:

To enable ssh service from firewall or To add ssh service to firewall use below command.

firewall-cmd --permanent --add-service ssh

Reload The Firewall:

Now you have enabled ssh service through firewall. After enabling the ssh service through the firewall reload firewall.

firewall-cmd --reload

Reload The SSHD Service:

Then reload your sshd service

systemctl reload sshd

Now you have successfully configured ssh service in centos/rhel

Leave a Reply

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