myssh: Run Connect before other commands

This commit is contained in:
Kevin Baensch 2022-11-17 15:26:23 +01:00
parent c5f889bb4d
commit 5c9bdad642

View file

@ -63,13 +63,12 @@ run_client() {
MAIN_OPTION=$1 MAIN_OPTION=$1
shift shift
# ensure connection
connect
case $MAIN_OPTION in case $MAIN_OPTION in
ls) ls)
ls_hosts;; ls_hosts;;
connect) connect)
# ensure connection
connect
# check if host is valid # check if host is valid
TARGET_HOST=$1 TARGET_HOST=$1
shift shift