Vscode configures RemoteSSH password-free login

Create a new user under Linux system

Create a user
useradd username (fill in the user name you want to create)
insert image description here
Change the password
passwd username (fill in the user name)
insert image description here

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
insert image description here
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.
insert image description here
3. authorized_keysModify the permissions to 600
insert image description here

Configure the SSH configuration file of vscode

insert image description here
insert image description here
insert image description here
After the configuration is complete, SSH password-free login can be realized

Guess you like

Origin blog.csdn.net/QAZ600888/article/details/130619507