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
Table of contents 1. V8 Source 2. V8 Service Targ...
This article example shares the specific code of ...
This article introduces and shares the responsive...
<br />Hello everyone! It’s my honor to chat ...
It is recommended to use the sudo su command to s...
Use scenarios: The project's pages need to lo...
Introduction In orm frameworks, such as hibernate...
Use CSS to create a 3D photo wall. The specific c...
I rewrote my personal website recently. I bought ...
Preface MySQL supports multi-threaded replication...
It is essentially a common js object used to desc...
Generally speaking, after the container is starte...
Table of contents 1. Introduction 2. Ideas Two wa...
The complete steps of Centos7 bridge network conf...
The configuration method of MySQL 5.5.56 free ins...