vscode SSH 保存密码自动登录服务器
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vscode SSH 保存密码自动登录服务器相关的知识,希望对你有一定的参考价值。
参考技术A则会提示:
保存后, 再次用vscode登录即可
source: https://www.chrisjhart.com/Windows-10-ssh-copy-id/
At the moment, Windows 10’s implementation of the OpenSSH client does not have the ssh-copy-id command available. However, a PowerShell one-line command can mimic the ssh-copy-id command and allow you to copy an SSH public key generated by the ssh-keygen command to a remote Linux device for passwordless login.
Note: If you have already generated an SSH keypair that you would like to use, skip this section and proceed to the Copy SSH Key to Remote Linux Device section.
First, open a new PowerShell window ( not a Command Prompt window!) and generate a new SSH keypair with the ssh-keygen command. By default, the public and private keys will be placed in the %USERPROFILE%/.ssh/ directory. The public key file we are interested in is named id_rsa.pub .
Next, we use the below PowerShell one-line command to copy the contents of the id_rsa.pub public key to a remote Linux device. Replace the IP-ADDRESS-OR-FQDN with the IP address or FQDN (Fully Qualified Domain Name) of the remote Linux device you would like to copy the public key to.
An example of this command is shown below. In this example, I am copying the contents of the id_rsa.pub public key to a remote Linux device at IP address 192.168.30.31.
Finally, verify that you can SSH to the remote Linux device with the ssh command. An example to a remote Linux device at IP address 192.168.30.31 is shown below. Note how a password did not need to be entered in order for us to establish SSH connectivity to the remote Linux device.
The instructions for this blog post were heavily inspired by Scott Hanselman’s blog post on the subject.
以上是关于vscode SSH 保存密码自动登录服务器的主要内容,如果未能解决你的问题,请参考以下文章