ca226c3cf21d12b913300850b3ea681758fc2ea8
[feisty_meow.git] / scripts / security / ssh.sh
1 #!/bin/bash
2
3 # wraps our calling the secure shell and lets us pick our credentials.
4
5 source "$FEISTY_MEOW_SCRIPTS/pick_credentials.sh"
6
7 \ssh -i "$keyfile" -X $*
8
9 if [ $? -eq 0 ]; then
10   # we don't want to emit anything extra if this is being driven by git.
11   if [ -z "$(echo $* | grep git)" ]; then
12     # re-run the terminal labeller after coming back from ssh.
13     # we check the exit value because we don't want to update this for a failed connection.
14     bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
15   fi
16 fi
17
18