vscode遠程開發,使你在本地環境便可完成遠程主機全部的開發,調試操做。能夠理解爲可視化,增強版的SSH。前端
上圖爲其架構,能夠看到在遠程OS中會運行一個VScode Server做爲後端,負責管理源碼,處理終端命令,Run & debug,而local Vscode則做爲前端,負責頁面展現。先後端經過網絡通訊,達到遠程開發的體驗。 vscode提供了三種遠程開發wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-utils-2.17-55.el6.x86_64.rpm
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-static-2.17-55.el6.x86_64.rpm
sudo rpm -Uh --force --nodeps \
glibc-2.17-55.el6.x86_64.rpm \
glibc-common-2.17-55.el6.x86_64.rpm \
glibc-devel-2.17-55.el6.x86_64.rpm \
glibc-headers-2.17-55.el6.x86_64.rpm \
glibc-static-2.17-55.el6.x86_64.rpm \
glibc-utils-2.17-55.el6.x86_64.rpm
# Update libstdc++
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/gcc-4.8.2-16.3.fc20/libstdc++-4.8.2-16.3.el6.x86_64.rpm
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/gcc-4.8.2-16.3.fc20/libstdc++-devel-4.8.2-16.3.el6.x86_64.rpm
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/gcc-4.8.2-16.3.fc20/libstdc++-static-4.8.2-16.3.el6.x86_64.rpm
sudo rpm -Uh \
libstdc++-4.8.2-16.3.el6.x86_64.rpm \
libstdc++-devel-4.8.2-16.3.el6.x86_64.rpm \
libstdc++-static-4.8.2-16.3.el6.x86_64.rpm
複製代碼
#打開powershell
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
# 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
#若是有人在這裏安裝ssh失敗並報錯,一般是已經完成安裝,只要你在cmd或powershell中能調用ssh這個命令,而且可以生成公鑰或者私鑰便可。
#生成你公鑰和私鑰,地址一般爲C:\Users\{當前用戶名}\.ssh
ssh-keygen -t rsa
複製代碼
生成完後將你的id_rsa.pub裏的內容追加到遠程主機authorized_keys文件中,authorized_keys文件一般在/home/{用戶名}/.ssh目錄,好比這裏我是root用戶。node
Host {主機名,無所謂}
HostName {主機ip地址}
User {遠程ssh登陸使用的帳戶}
IdentityFile {指定你的私鑰地址,C:\Users\{當前用戶名}\.ssh\id_rsa,必定要指定對啊,否則免密登陸會失敗}
複製代碼
到此配置完畢,點擊圖下圈出圖標,等待遠程主機環境搭建完成便可。 linux
經常使用功能:不經常使用,我之後用到了再更新c++
複製圖片到md文件 docker