Set TERM variable for older remote servers
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
55eb1789c7
commit
22dc4efdd9
1 changed files with 13 additions and 13 deletions
|
@ -4,24 +4,24 @@ set -euo pipefail
|
|||
source ${HOME}/bin/script_framework.sh
|
||||
|
||||
function usage() {
|
||||
fail "Missing parameters. Usage: $(basename $0) [-k <key>] [-p <port>] -- <host> [ssh-param ...]"
|
||||
fail "Missing parameters. Usage: $(basename $0) [-k <key>] [-p <port>] -- <host> [ssh-param ...]"
|
||||
}
|
||||
|
||||
KEY_NAME="loki"
|
||||
PORT="22"
|
||||
|
||||
while getopts ":k:p:" o; do
|
||||
case "${o}" in
|
||||
k)
|
||||
KEY_NAME="${OPTARG}"
|
||||
;;
|
||||
p)
|
||||
PORT="${OPTARG}"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
case "${o}" in
|
||||
k)
|
||||
KEY_NAME="${OPTARG}"
|
||||
;;
|
||||
p)
|
||||
PORT="${OPTARG}"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
|
@ -37,4 +37,4 @@ step "Loading key ${KEY_NAME}"
|
|||
vault-sshadd "${KEY_NAME}"
|
||||
|
||||
step "Executing ssh"
|
||||
exec ssh -p ${PORT} "${HOST}" "$@"
|
||||
exec env TERM=xterm-color ssh -p ${PORT} "${HOST}" "$@"
|
||||
|
|
Loading…
Reference in a new issue