我正在尝试遵循这个链接,尝试用Mac中的VSCode连接到我的迷茫vm盒中。但每次我都“无法建立与默认的连接”。
该链接要求将“迷走性ssh-config”结果复制到~/.ssh/config。在我这样做之前,~/..ssh文件夹是空的。
从“流浪者ssh- config”复制的配置文件的内容如下:
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/stewartty/udacity-courses/fullstack/vagrant/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
Host vagrant
HostName vagrant
User vagrant
在VSCode中,我安装了远程SSH扩展。然后,我完全按照链接中列出的单词(打开命令调色板并选择./ssh/config文件,再次打开命令调色板并选择'Remote :ConnecttoHost.andselect‘)。
发布于 2021-06-30 15:22:30
我犯了一个新手的错误-我应该先运行vagrant up
,然后尝试使用remote-ssh
使用VSCode。在运行vagrant up
之后,远程处理没有问题。
发布于 2021-05-26 20:13:21
检查你的迷途IP。大多数情况下都有您的inet
范围ip,以查看虚拟机。
ifconfig | grep inet
请参阅Vagrantfile
网络部分
https://stackoverflow.com/questions/67711898
复制相似问题