[GH-ISSUE #129] Scripts for waiting mac ssh to come up #105

Closed
opened 2026-02-27 22:07:58 +03:00 by kerem · 2 comments
Owner

Originally created by @shifujun on GitHub (Jan 19, 2021).
Original GitHub issue: https://github.com/sickcodes/Docker-OSX/issues/129

Just sharing😃

Install sshpass for auto enter password.
sudo yum install sshpass

Make a sshDockerOsx.sh:

sshpass -p docker-osx \
ssh \
  -o UserKnownHostsFile=/dev/null \
  -o StrictHostKeyChecking=no \
  -p 50922 \
  docker-osx@localhost $@

Make a waitForDockerOsx.sh:

until ./sshDockerOsx.sh true; do
  echo "sleep 2 for waiting"
  sleep 2
done
echo "Docker-OSX SSH ready"

After docker run -d .... start up macOs, execute ./waitForDockerOsx.sh && ./sshDockerOsx.sh can auto wait and login macOS.

Originally created by @shifujun on GitHub (Jan 19, 2021). Original GitHub issue: https://github.com/sickcodes/Docker-OSX/issues/129 Just sharing😃 Install `sshpass` for auto enter password. `sudo yum install sshpass` Make a `sshDockerOsx.sh`: ``` sshpass -p docker-osx \ ssh \ -o UserKnownHostsFile=/dev/null \ -o StrictHostKeyChecking=no \ -p 50922 \ docker-osx@localhost $@ ``` Make a `waitForDockerOsx.sh`: ``` until ./sshDockerOsx.sh true; do echo "sleep 2 for waiting" sleep 2 done echo "Docker-OSX SSH ready" ``` After `docker run -d ....` start up macOs, execute `./waitForDockerOsx.sh && ./sshDockerOsx.sh` can auto wait and login macOS.
kerem closed this issue 2026-02-27 22:07:58 +03:00
Author
Owner

@sickcodes commented on GitHub (Jan 19, 2021):

Perfect! This will work good for version 3, will be using SSH keys however, but the loop is good, thank you 😁!

<!-- gh-comment-id:762812355 --> @sickcodes commented on GitHub (Jan 19, 2021): Perfect! This will work good for version 3, will be using SSH keys however, but the loop is good, thank you 😁!
Author
Owner

@sickcodes commented on GitHub (Jan 24, 2021):

Added here: github.com/sickcodes/Docker-OSX@a09c565e36

<!-- gh-comment-id:766413298 --> @sickcodes commented on GitHub (Jan 24, 2021): Added here: https://github.com/sickcodes/Docker-OSX/commit/a09c565e36d45f6663567b7c4f1402279e725519
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-OSX#105
No description provided.