0

How to Change the Port Number of SSH On CentOS 7.6 and connect using that port

Hello, I just want to change the port number of ssh and connect to my target system using that port. How Should i connect using a different port?

owen
asked May 20, 2019
1 Answer
0

In the SSH Config File , Locate the line # Port 22 ,add the port number that you would want to connect by commenting on the default port(22) and save the configuration file.
vim /etc/ssh/sshd_config

Port 8989

Restart the service of SSH
systemctl restart sshd

To Connect using the new port.
ssh-p 8989 root@<IP>

View More
linuxhelp
answered May 20, 2019
Your Answer
||||
 
100:0