Navicat connection to remote database and modification of SSH default port number

Time:2021-12-6

Use Navicat to connect to MySQL 8 database on ECS, just configure two tabs.
The configuration screenshot of the General tab is as follows (the password here is the password to log in to the database)
Navicat connection to remote database and modification of SSH default port number
The screenshot of the SSH tab is as follows (the password here is the password to log in to the ECS)
Navicat connection to remote database and modification of SSH default port number
After the connection is successful, the dolphin icon will be highlighted
Navicat connection to remote database and modification of SSH default port number

Different from connecting to the local database, connecting to the remote database has one more setting (here is the SSH setting). Since I log in to the ECS using putty, the private key file is generated by putty. Therefore, when setting Navicat, you can directly use the. PPK file originally generated by putty. The PPK file is a putty private key file. Navicat is smart enough to recognize this file.

Linux only needs to know a few commands to modify the SSH port number
sysctl -a|grep port_rangeThis command can query the range of port numbers and get [32768, 60999]
vim /etc/ssh/sshd_configThis command opens the configuration file and finds port 22, which is the default SSH port number and can be modified to the desired number.
service sshd restartAfter saving and exiting the VIM editor, enter this command to verify that the modified port number takes effect. Although the maximum available port number queried is 60999, the test found that the port number 65535 can also be used normally. However, 65536 will not work, which will lead to sshd restart failure.
service sshd statusIf there is no error when sshd restarts, you can further enter this command to check the service status. If you can see the green text active (running), you can safely and boldly restart the server. After restart, putty’s connection port number must be modified. Similarly, the SSH port of Navicat needs to be modified.
Navicat connection to remote database and modification of SSH default port number
Why change the port number? It is said that some server connection tools have backdoors, and the security problem is worrying. If these tools are not used, they really can’t. There’s no way but to change the port number.

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Recommended Today

You have to know about JVM garbage collection

catalogue 1、 Four citation methods1.1 strong reference1.2 soft reference1.3 weak reference1.4 phantom reference 2、 How to judge whether the object is garbage2.1 reference counting method2.2 root accessibility analysis 3、 Garbage collection algorithm3.1 mark sweep3.2 mark compact3.3 mark copy 4、 Garbage collector4.1 classification and characteristics4.1.1 serial4.1.2 throughput priority4.1.3 priority of response time4.2 serial garbage collector details […]