Tencent Cloud Server CVM creates and configures SSH keys – creates the key and applies it to the server

888u

Last update at :2024-07-06,Edit by888u

Generally speaking, when we deal with the security of VPS and servers, we set more complex passwords, usually numbers, characters, uppercase and lowercase letters, and the number is more than ten digits, and the default port 22 needs to be modified. If you want to be stricter If so, you can modify it again after a period of time, which can basically ensure the security of the entrance to the general server. If we need something more complicated, we can directly use the SSH key login method. We need to combine the local SSH key file and the key password, and modify the port, which can be relatively safer.

If we are an ordinary project, basically the port and complex password can be solved. If our project is more important, it is not complicated to enable SSH key management. Snail has also shared several articles about SSH keys in previous articles. Login article. Today, one of the company's projects uses Tencent Cloud Server CVM, which requires the use of SSH keys, so I recorded the creation and configuration process.

First, create a new key pair that comes with Tencent Cloud

Log in to Tencent Cloud backend and add a key pair in SSH key management.

There are two ways to create SSH keys, one is to directly generate the key from Tencent Cloud, and the other is to throw in the key created by ourselves. Here, Snail will first take a look at the first form, which is generated using Tencent Cloud. Set the key name.

After it is generated, we will be asked to download it locally. This should be saved and will need to be imported when connecting to the SSH tool later.

Second, add an existing key

We can add the key generated by the SSH tool. Reference: Xshell sets key login to ensure Linux VPS and server are more secure.

Third, apply the key to Tencent Cloud Server

Here Snail adds a key generated by Tencent, and a key generated locally with a password. The former does not have a password.

Select the key we need to use, then bind the cloud server, and select the current cloud server to bind.

Fourth, SSH key to connect to the server

Here Snail uses the key generated by Tencent Cloud. This is different from the custom key in that the key password is not set and the key can be connected directly.

Open our SSH tool, and then fill in the server IP address. The default port here is 22 (will be modified later). If we modify it ourselves, we will use the modified port. Then you need to import the key.

Then save the link and log in to SSH directly. Similarly, if we use a custom key to import it, we will need to enter the password to log in based on the key password we set. From a security perspective, a self-built key + password will be more secure.

Recommended site searches: free space, Western Digital registration, overseas virtual host, asp host space, US virtual space registered domain name, domain name registration information query, host server rental, all-purpose virtual host, ip proxy,

Tencent Cloud Server CVM creates and configures SSH keys – creates the key and applies it to the server

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码