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
shift
# ensure connection
connect
case $MAIN_OPTION in
ls)
ls_hosts;;
connect)
# ensure connection
connect
# check if host is valid
TARGET_HOST=$1
shift