Create a new user under Linux system
Create a user
useradd username
(fill in the user name you want to create)
Change the password
passwd username
(fill in the user name)
Generate local public key under Windows system
1. Open the cmd window, execute it , and a pair of public and private keys 'ssh-keygen'
will be generated users/username/.ssh
2. Add the local SSH public key to the target server
Add the locally generated SSH public key to the target server. You can use the following command to add the public key to the authorized_keys file of the target server:
ssh-copy-id username@remote_host
here you need to replace username with the username of the target server, and replace remote_host with the IP address or domain name of the target server.
If the ssh-copy-id command is not available, you can manually add the public key to the target server's authorized_keys file.
3. authorized_keys
Modify the permissions to 600
Configure the SSH configuration file of vscode
After the configuration is complete, SSH password-free login can be realized