Current location - Quotes Website - Collection of slogans - How to change the port number of linux server
How to change the port number of linux server
Find httpd.conf in apache directory, open it with vi, find the line port=80, change 80 to an unused port number on this server, save and exit. Then restart the apache process.

Vi/etc/ssh/sshd_config, find Port22, then change Port 22 to the port number you want, restart SSH service: /etc/init.d/sshdrestart, and then test SSH connection: sshlocalhost-p Your port number, and the connection is successful.

First, check whether the SSH package has been installed in linux, and use rpm-QA | grepsash. Confirm that the ssh service has been started. The following small series takes centos system as an example. The path to find the SSh service configuration file is usually the file sshd_config in the /etc/ssh directory.