How to change the SSH port on Centos 7.x?

Your video will begin in 10
73 Views
Published
Enhance your server security with this tutorial on changing the SSH port in CentOS 7.x. Elevate your server's defence—watch now!

#accuwebhosting #SSH #CentOS7 #ServerSecurity #SSHConfiguration #securitytutorial

Get in touch with us for your hosting queries:
https://bit.ly/3CvxLCy

Email: sales@accuwebhosting.com
Twitter: https://twitter.com/accuwebhosting​​​​
Facebook: https://facebook.com/accuwebhosting/​​​​
Telegram channel: https://t.me/accuwebhosting​​​​
Phone: 8777674678

Commands:
Step 1: Log in to the server using the root user.
#ssh your_username@host_ip_address

Step 2: Take a backup of the current SSH configuration.
#date_format=`date +%Y_%m_%d:%H:%M:%S`
#sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config_$date_format
$ ls /etc/ssh/sshd_config*

Step 3: Open SSH new port on FirewallD.
#sudo firewall-cmd --add-port=3452/tcp --permanent
#sudo firewall-cmd --reload

Step 4: Change the SSH service port.
#sudo vi /etc/ssh/sshd_config

Step 5: Restart the service.
#sudo systemctl restart sshd

Command to connect VPS using the port number
#ssh your_username@host_ip_address -p port_number
Category
AccuWeb Hosting
Tags
How to change the SSH port on Centos 7.x, How to secure a Linux server, Change SSH Port in CentOS
Be the first to comment