Forward 127.0.0.1:2222 on your machine to port 22 of the VM:
VBoxManage modifyvm CS356 --natpf1 "ssh,tcp,,2222,,22"
Now you can log into the VM through SSH: ssh -p 2222 trojan@127.0.0.1
(The VM should have this mapping already.)
Install VS Code on your machine (macOS, Windows, Linux)
Install the Remote Development extension of VS Code
F1
, Remote-SSH: Connect to host...
, ssh://trojan@127.0.0.1:2222
, enter password developer
(many times)
To avoid entering the password many times, you can configure an SSH key
Now your VS Code terminal is trojan@cs356
: any command that you give here is running on the VM. You can clone your assignment repository with git clone ...
, open its folder in VS Code, and run make
inside it (or debug).