Sorry for updating this so late.
The solution was pretty simple, as @MnZrk commented, what it needs to be done for setting up the connection is the following:
- Run
vagrant ssh-config > some-file.txt
. This will generate a file with the configuration to run using SSH. Here an example of that file:
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile C:/Users/User/project/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
ForwardAgent yes
ForwardX11 yes
Notice that the host name is default
, you could rename it to whatever you want so you could identify it more easily.
Copy the content of some-file.txt
inside your SSH configuration file. This file could be edit directly from vscode by pressing F1
and writing Remote-SSH: Open Configuration File...
, then you select the file you use for ssh configuration. After that file opens, just copy the content of some-file.txt
there.
Finally, just press again F1
and type Remote-SSH: Connect to Host...
, choose the connection with the host name default
or the want you wrote in the first step, and that's all.
Remote SSH
:D – Spinescent