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
|
source ${HOME}/bin/script_framework.sh
|
||||||
|
|
||||||
function usage() {
|
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"
|
KEY_NAME="loki"
|
||||||
PORT="22"
|
PORT="22"
|
||||||
|
|
||||||
while getopts ":k:p:" o; do
|
while getopts ":k:p:" o; do
|
||||||
case "${o}" in
|
case "${o}" in
|
||||||
k)
|
k)
|
||||||
KEY_NAME="${OPTARG}"
|
KEY_NAME="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
p)
|
p)
|
||||||
PORT="${OPTARG}"
|
PORT="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
|
@ -37,4 +37,4 @@ step "Loading key ${KEY_NAME}"
|
||||||
vault-sshadd "${KEY_NAME}"
|
vault-sshadd "${KEY_NAME}"
|
||||||
|
|
||||||
step "Executing ssh"
|
step "Executing ssh"
|
||||||
exec ssh -p ${PORT} "${HOST}" "$@"
|
exec env TERM=xterm-color ssh -p ${PORT} "${HOST}" "$@"
|
||||||
|
|
Loading…
Reference in a new issue