mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
Accessing the macOS VM over SSH #50
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jviotti on GitHub (Jun 24, 2020).
I'm following the instructions and running the VM by port forwarding the SSH port
-p 50922:10022, however I can't get a shell on the VM atlocalhostfrom the host as the connection is refused andnmapdoesn't show the port being open.Am I missing something?
@sickcodes commented on GitHub (Jun 24, 2020):
ssh localhost -p 50922
You also have to turn on system sharing once you've installed the OS
Its under "remote login" in OSX settings
@jviotti commented on GitHub (Jun 25, 2020):
I see. It would be nice to mention this in the docs! Thanks!
@jviotti commented on GitHub (Jun 25, 2020):
I'm afraid I can't make it work yet. I enabled remote login in macOS, and I can ssh to the VM from within the VM at port 22, but 50922 never gets forwarded to the host.
@sickcodes commented on GitHub (Jun 25, 2020):
docker psSee if you have anything else using that port
Did you copy the ports exactly as they are in the readme and/or top of the docker file?
localhost:50922 goes to container:10022 which goes to guest:22
@jviotti commented on GitHub (Jun 26, 2020):
@sickcodes This is the output of
docker ps. I'm not very familiar with Docker but I would have expected to see something in thePORTScolumn:And I'm running the image as:
The corresponding line from
Launch.shis also correctly substituted withenvsubst:And remote login is enabled:
@jviotti commented on GitHub (Jun 26, 2020):
@sickcodes I was able to connect to it by omitting the
--net hostoption indocker run. The port is bound and I can see that indocker ps, however the VM has no internet connection now :/@jviotti commented on GitHub (Jul 6, 2020):
@sickcodes Any clues about this? I've been trying some long shots, but I feel that I'm mostly in the dark. I'm following the instructions exactly as described in the README, so it must be something in my host system, right?
@sickcodes commented on GitHub (Jul 7, 2020):
Building on mine and checking now
@jviotti commented on GitHub (Jul 7, 2020):
@sickcodes I think got to the bottom of it. The DNS requests would get blocked by
firewalldon my Fedora 32 system. See this snippet fromdocker0after trying to ping google from within the container:Things work again if I set
docker0to the trusted zone:See https://github.com/docker/for-linux/issues/955