1
0
mirror of https://github.com/rancher/os.git synced 2025-06-23 21:47:03 +00:00
os/scripts/ssh

17 lines
421 B
Plaintext
Raw Normal View History

#!/bin/bash
set -e
cd $(dirname $0)/..
2015-05-10 11:59:38 +00:00
chmod 0600 ./assets/rancher.key
2015-07-21 11:42:59 +00:00
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