May 18, 20215 yr Hey everyone I would like to make use of VS Code's remote SSH functionality. I currently work on a Macbook Pro but would like to develop in a native Linux environment for several reasons. It would also be nice to make use of my server GPU when working remotely. I have set up an Elementary OS VM on my server but am having trouble with how to SSH from my Macbook into my VM on Unraid. My thinking is there should be a way to forward some port to the VM by using my servers IP? I have installed OpenSSH-server on the VM. Where do I go from here? Thanks for any help! P.S. I'm a network/VM noob, so baby steps are appreciated!
May 19, 20215 yr One way (the way I'm using) is to create a bridge connection (unraid <--> vm); with a bridge you can assign ips to both vm and unraid, let's say unraid is 192.168.2.1 and vm 192.168.2.2. Now if you attach a lan cable to the physical ethernet port you setup the bridge and to your macbook and you assign to your macbook for example the ip 192.168.2.3 you can reach your vm from your macbook. I hope I was clear enough. Or you can passthrough a physical ethernet to your vm and attach directly to the macbook, so without any bridge, because the ethernet is "native" in the vm. Or, similar to above, you can attach (passthrough) a usb wifi dongle to the vm and connect from the macbook via wifi. The important thing is that both the vm and the macbook must be on the same network. Edited May 19, 20215 yr by ghost82
May 20, 20215 yr Author On 5/19/2021 at 2:15 PM, ghost82 said: One way (the way I'm using) is to create a bridge connection (unraid <--> vm); with a bridge you can assign ips to both vm and unraid, let's say unraid is 192.168.2.1 and vm 192.168.2.2. Now if you attach a lan cable to the physical ethernet port you setup the bridge and to your macbook and you assign to your macbook for example the ip 192.168.2.3 you can reach your vm from your macbook. I hope I was clear enough. Or you can passthrough a physical ethernet to your vm and attach directly to the macbook, so without any bridge, because the ethernet is "native" in the vm. Or, similar to above, you can attach (passthrough) a usb wifi dongle to the vm and connect from the macbook via wifi. The important thing is that both the vm and the macbook must be on the same network. That is clear, thanks. Ideally I would like to be able to access this all remotely (via the internet) though. I wonder if there is some way to map my OpenSSH port on the VM to a server port somehow? That way I could use my internet IP/domain with that port to access the VM SSH port. Not sure if that sounds reasonable.
May 20, 20215 yr ok, the above are still valid solutions: with all solutions your vm should able to access the internet if it is set in the same network as your modem/router. Now in your router settings just set a port forward, to forward requests from outside on <public ip>:choosenPort to port 22 on <internal-ip-of-vm>. Check security when you open ports to the outside! Edited May 20, 20215 yr by ghost82
Archived
This topic is now archived and is closed to further replies.