ssh 421 B

1234567891011121314151617
  1. #!/bin/bash
  2. set -e
  3. cd $(dirname $0)/..
  4. chmod 0600 ./assets/rancher.key
  5. UNAME=$(uname)
  6. if [ "$UNAME" == "Darwin" ]; then
  7. HOST=192.168.64.2 # consult `/var/db/dhcpd_leases` or delete it
  8. exec ssh -F ./assets/scripts_ssh_config -i ./assets/rancher.key rancher@${HOST} "$@"
  9. elif [ "$UNAME" == "Linux" ]; then
  10. exec ssh -p 2222 -F ./assets/scripts_ssh_config -i ./assets/rancher.key rancher@localhost "$@"
  11. fi