allow to connect from ssh without DISPLAY
This commit is contained in:
parent
3cfec305be
commit
f1e69bf5ea
@ -8,7 +8,6 @@ then
|
||||
fi
|
||||
|
||||
HOST="${1}"
|
||||
PROG="${2:-xterm}"
|
||||
|
||||
if echo "$HOST" | grep -v kube$
|
||||
then
|
||||
@ -40,4 +39,12 @@ then
|
||||
fi
|
||||
|
||||
ssh-keygen -R "$HOST" >/dev/null 2>/dev/null
|
||||
ssh -o StrictHostKeyChecking=no -Y user@$HOST "$PROG"
|
||||
if [ -n "$DISPLAY" ]
|
||||
then
|
||||
PROG="${2:-xterm}"
|
||||
ssh -o StrictHostKeyChecking=no -Y "user@${HOST}" "${PROG}"
|
||||
else
|
||||
PROG="${2:-}"
|
||||
ssh -o StrictHostKeyChecking=no -Y "user@${HOST}" "${PROG}"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user