mirror of
https://github.com/rancher/os.git
synced 2025-07-04 02:26:13 +00:00
./scripts/ssh: support OS X
This commit is contained in:
parent
229e4e0fbd
commit
47d658cf4a
10
scripts/ssh
10
scripts/ssh
@ -5,4 +5,12 @@ cd $(dirname $0)/..
|
|||||||
|
|
||||||
chmod 0600 ./assets/rancher.key
|
chmod 0600 ./assets/rancher.key
|
||||||
|
|
||||||
exec ssh -p 2222 -F ./assets/scripts_ssh_config -i ./assets/rancher.key rancher@localhost "$@"
|
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 "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user