PrefaceThe default ssh port number of the server is generally 22, so most users need to change the default ssh port number for security reasons. The following is how to change the default ssh port number: This experiment is based on the fact that I changed the port number to 2222 before. Now I changed it back to 22, so I finally connected to port number 22. Whether you change it to something else or change it back, the method is the same. startEnter edit mode: vi etc/ssh/sshd_config Then press i to enter insert mode Move the cursor below #Port 20 Enter the Port number Then press Esc to exit the insert mode, enter: wq to save and exit, and return to the current interface Then enter setenforce 0 Restart sshd file systemctl restart sshd Turn off the firewall to prevent modification failure systemctl stop firewalld Then restart the virtual machine reboot Log in again to get dhclient to view the IP address Then reconnect: This is the end of this article about how to modify the ssh port number in the Centos8 environment. For more information about how to modify the ssh port in Centos8, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Comprehensive understanding of html.css overflow
1. Mental Journey When I was writing the cockpit ...
The functions of the three attributes flex-grow, ...
Redis is a distributed cache service. Caching is ...
Here I use samba (file sharing service) v4.9.1 + ...
Vue routing this.route.push jump page does not re...
Transactions ensure the atomicity of multiple SQL...
Preface Bash has many important built-in commands...
Recorded the installation tutorial of mysql 5.7.1...
1. Indexing principle Indexes are used to quickly...
background: I have done a project before, which r...
I reinstalled the computer and installed the late...
This article mainly introduces the implementation...
Here is the mysql driver mysql.data.dll Notice: T...
First install ssh in Linux, taking centos as an e...
Table of contents 1. Server 2. Client 3. Testing ...