X

Please Select Country (Region)

Turkey (Türkçe)Turkey (Türkçe) World Wide (English)World Wide (English)

Change the SSH Port of CentOS 7

HomeArticlesWhm-cPanelChange the SSH Port of CentOS 7

Hello,


You can also find a detailed article on how to change the SSH Port for CentOS 7 operating system users.

If you want to change the default SSH port number in CentOS 7, you can perform the following steps.

1. Let's back up the sshd_config file.

cp / etc / ssh / sshd_config /etc/ssh/sshd_config.bak

2. Change the port number

nano -w / etc / ssh / sshd_config
We remove the # at the beginning of the #Port line in the opened file and enter the port number we want to use.


Save with ctrl + x and exit.
3. Allow access to the port.

semanage port -a -t ssh_port_t -p tcp PORTFIELD

If you get an error in command not found, let's download the following library.

yum -y install policycoreutils-python

4. Restart the SSH service.

systemctl restart sshd.service
Good work...

cPanel Plesk Litespeed Cloudlinux Microsoft.net Comodo Visa/Master
SUBSCRIBE

Call us now for more information about our products and services.

0 850 840 52 20

This site is GDPR compliant.
Copyright © 2018 Sitemio LLC. All Rights Reserved.
Proudly providing by WSCMS
Top