Statement 1: I Caishuxueqian, with Guo Degang words, "I was a schoolboy," if wrong, welcomed the discussion, do not abuse ^ _ ^.
Statement 2: Keep the original blog when reproduced the original link or add my blog address at the beginning of the article, or the right to retain legal liability.
Resources
- Related News: VS Remote Code published! Open a new era of remote development
- Official Help: https://code.visualstudio.com/docs/remote/ssh#_getting-started
- GitHub Address: https://github.com/microsoft/vscode (or can not handle the google mentioned in this issue)
Windows Installation
VS Code - Insiders download
Download: Portal
Remote Development Extension Installer
Download and install Openssh
Reference Help: Portal
using PowerShell, start as administrator
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
# This should return the following output:下面是返回的输出信息
Name : OpenSSH.Client~~~~0.0.1.0
State : NotPresent
Name : OpenSSH.Server~~~~0.0.1.0
State : NotPresent
Then, install the server and / or client functionality:
# Install the OpenSSH Client
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
# Install the OpenSSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# Both of these should return the following output:两个的输出信息都如下面所示
Path :
Online : True
RestartNeeded : False
To configure the initial use OpenSSH on Windows server, start PowerShell, an administrator, and then run the following command to start the SSHD service:
Start-Service sshd
# OPTIONAL but recommended:
Set-Service -Name sshd -StartupType 'Automatic'
# Confirm the Firewall rule is configured. It should be created automatically by setup.
Get-NetFirewallRule -Name *ssh*
# There should be a firewall rule named "OpenSSH-Server-In-TCP", which should be enabled
Example of use:
ssh username@servername
use
-
Open VS Code, when landing automatically open a command line window, open the Settings Remote-SSH-Settings by ctrl + shift + p, set Remote.SSH: Show Login Terminal is true
-
After installing the plug-in the lower left corner there will be a green icon, click to select several options will pop up in the command window
-
You can select a piece of config files can also be directly input
user@host
(such as [email protected])
Of course, you can also use the configuration file, the format is as follows:# Read more about SSH config files: https://linux.die.net/man/5/ssh_config Host 输入你的Host名字 HostName 输入你的IP地址 User 输入你的用户名
-
Because I was selected user name and password, and therefore need to enter the password on the command line after landing. You need to enter the password below vs code. This requires a continuous input password several times, we must pay attention to watch.
-
Open the folder was at the bottom of the password entered into the system, this is done click ok then this Haofan
6. final image
postscript
This time to re-add it