1
0
mirror of https://github.com/rancher/os.git synced 2025-07-03 18:16:13 +00:00

./scripts/ssh: support OS X

This commit is contained in:
Ivan Mikushin 2015-07-21 16:42:59 +05:00
parent 229e4e0fbd
commit 47d658cf4a

View File

@ -5,4 +5,12 @@ cd $(dirname $0)/..
chmod 0600 ./assets/rancher.key chmod 0600 ./assets/rancher.key
UNAME=$(uname)
if [ "$UNAME" == "Darwin" ]; then
HOST=192.168.64.2 # consult `/var/db/dhcpd_leases` or delete it
exec ssh -F ./assets/scripts_ssh_config -i ./assets/rancher.key rancher@${HOST} "$@"
elif [ "$UNAME" == "Linux" ]; then
exec ssh -p 2222 -F ./assets/scripts_ssh_config -i ./assets/rancher.key rancher@localhost "$@" exec ssh -p 2222 -F ./assets/scripts_ssh_config -i ./assets/rancher.key rancher@localhost "$@"
fi