VSCode使用Remote-SSH免密码登陆远程服务器

1。安装VSCode

brew cask install visual-studio-code

2。装Remote-SSH

code --install-extension ms-vscode-remote.remote-ssh

3。配置ssh的key

cd ~/.ssh
ssh-keygen
ssh-copy-id root@ip

4。 然后向.ssh/config文件添加以下内容

Host CentOS6
  HostName ip
  User root
  Port 22

第3和第4步中ip是同一个ip,以后可以愉快地进行服务器开发了,happy coding!

刚发现官网有这部分内容的介绍,下面是链接

Remote-SSH

posted @ 2020-02-09 14:50  just_c  阅读(4864)  评论(0)    收藏  举报