ssh配置免密登录及连接远程主机的container

配置ssh免密码登录

  • 运行ssh-keygen会在$HOME/.ssh下生成两个文件:id_rsa.pub(公钥),id_rsa(私钥).
  • ssh-copy-id user@host
    把你本机的公钥拷贝到想要远程的主机上去. 远程主机会将公钥内容添加到它的$HOME/.ssh/authorized_keys文件末尾

再从本机ssh远程主机就不需要输入密码了.

ssh连接远程主机的container

需要安装插件remote-containers,docker

vscode官方文档

原文地址:https://www.cnblogs.com/sdu20112013/p/12788449.html