-
VSCode安装必要插件
-
编辑settings.json
添加"remote.SSH.showLoginTerminal": true -
虚拟机打开SSH服务
安装:sudo apt-get install openssh-server
启动SSH服务:sudo service ssh start -
更改SSH服务配置:
/etc/ssh/sshd_config
把配置文件中的PermitRootLogin without-password注释掉
增加一句PermitRootLogin yes
确定存在:PubkeyAuthentication yesAuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 -
插入公钥:
~.sshcat id_rsa.pub >> authorized_keys -
重启SSH服务
/etc/init.d/ssh restart -
查看ip:
ipconfig -
配置VSCode
参考资料:
https://blog.csdn.net/jiejiemcu/article/details/98752848
https://www.cnblogs.com/nightwindnw/p/11097178.html
相关文章: