owen
asked May 20 2019
Answer
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 SSHsystemctl restart sshd
To Connect using the new port.ssh-p 8989 root@<IP>
linuxhelp
asked May 20 2019
edited Jul 01 2019
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?