How to change port number on CentOS 7

$sudo vi /etc/ssh/sshd_config

*Edit the port number from 22 to 64322

$semanage port -a -t ssh_port_t -p tcp 64322

$sudo firewall-cmd --permanent --zone=public --add-port=64322/tcp

$sudo firewall-cmd --reload

$sudo systemctl restart sshd.service

$ ss -tnlp | grep ssh

  • 19857 Usuários acharam útil
Esta resposta lhe foi útil?

Artigos Relacionados

Linux - Setting a Static IP (Debian / Ubuntu Servers)

CyberOne Data - Linux Server(Debian / Ubuntu)Setting up a Static IPIntroduction:This howto help's...

How to Mount and Unmount a Partition in Linux

Mounting and Unmounting a Linux PartitionOnce you insert new hard disks into your system, you’ll...

Linux - Setting a Static IP (Redhat / CentOS Servers)

1. Configure eth0: [root@centos63 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0...

Linux - Setting Virtual (Multiple) IP's (Redhat / CentOS Servers)

Creating Virtual Interface and Assign Multiple IP Addresses Here I have an interface called...

CentOS_7 Password Recovery / Single User mode

Password Recovery / Single User Mode (CentOS_7)Steps:1.) Reboot your server2.) When it gets to...