Consolidate _src.posix into _home
This commit is contained in:
parent
bfdc7f4c1d
commit
f16c2e61b3
279 changed files with 2134 additions and 2190 deletions
|
@ -1 +0,0 @@
|
|||
../../../_src.posix/private_dot_local/bin/executable_tssh
|
29
chezmoi.roots/_home/private_dot_local/bin/executable_tssh
Normal file
29
chezmoi.roots/_home/private_dot_local/bin/executable_tssh
Normal file
|
@ -0,0 +1,29 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_NAME="${0##/*}"
|
||||
usage() {
|
||||
printf '%s\n' \
|
||||
'SSH using Teleport with interactive selection and VAST-reasnoble defaults' \
|
||||
'' \
|
||||
"${SCRIPT_NAME} " \
|
||||
'' \
|
||||
'Usage:' \
|
||||
''
|
||||
exit 2
|
||||
}
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
SEARCH="$1"
|
||||
SSHUSER="${SSHUSER:-vastdata}"
|
||||
TUNNEL="${TUNNEL:+-L ${TUNNEL}}"
|
||||
|
||||
TARGET="${SSHUSER}@$(tsh-get "$SEARCH" "$SSHUSER")"
|
||||
|
||||
tsh ssh ${TUNNEL} "${TARGET}" "${@:2}"
|
||||
|
||||
# vim: set ft=sh expandtab tabstop=4 shiftwidth=4:
|
Loading…
Add table
Add a link
Reference in a new issue