windows 10 1809后支持ssh命令linux
一、生成ssh密钥。使用如下命令,先生成本地公钥和私钥ssh-keygen -t rsa -b 4096
执行完后,本地用户文件夹【C:\Users\用户名.ssh】会生成 id_rsa 和 id_rsa.pub 两个文件,分别对应 私钥 和 公钥。windows
一、将windows开发机上生成的 id_rsa.pub 公钥文件内容,追加到 linux 上 /root/.ssh/authorized_keys 文件内
二、开启ssh登陆
参考连接:https://www.jianshu.com/p/4d83d8ecd192
三、windows 10开发机验证登录ssh root@[IP地址]
如图所示,表示登陆成功服务器
3、VS Code 配置
一、插件安装ssh
二、添加主机配置文件,并进行远程链接开发post
配置文件如图所示。右键左边的主机列表,点击 链接主机 选项.net
三、此时会新打开一个命令行界面,在linux服务器上自动安装vscode远程开发服务插件
四、配置完成命令行
https://code.visualstudio.com/docs/remote/troubleshooting#_configuring-key-based-authentication
3d
http://www.javashuo.com/article/p-ohgbybtb-gq.html
https://xirikm.net/2019/619-1
https://yq.aliyun.com/articles/711865code