put correctly ssh in it's function
This commit is contained in:
parent
830ffa53de
commit
cdf7896f26
1 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,7 @@ OPTION available
|
|||
-h, --help print this help and exit
|
||||
-u <user>,--user=<user> Select the user, by default root
|
||||
-p <port>,--port=<port> Select the port, by default 10022
|
||||
-H <hostname>, --hostname=<hostname> Select the host to connect #TODO
|
||||
-H <hostname>, --hostname=<hostname> Select the host to connect
|
||||
"
|
||||
|
||||
|
||||
|
@ -46,7 +46,8 @@ start_ssh() {
|
|||
then
|
||||
port="${default_ssh_port}"
|
||||
fi
|
||||
echo "start ssh"
|
||||
echo "start ssh with user=${user} port=${port} hostname=${hostname}"
|
||||
ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile=/dev/null" -p "${port}" "${user}@${hostname}"
|
||||
}
|
||||
|
||||
start_rsp() {
|
||||
|
@ -82,7 +83,7 @@ for (( arg=2; arg<$#; arg++)); do
|
|||
port="${!value}"
|
||||
elif [ "${!arg}" == "-H" ]
|
||||
then
|
||||
hostname="${!arg}"
|
||||
hostname="${!value}"
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -138,7 +139,6 @@ esac
|
|||
echo try to connect with user=${user} and port=${port}
|
||||
echo port=${port}
|
||||
|
||||
ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile=/dev/null" -p ${port} ${user}@localhost
|
||||
|
||||
|
||||
# add possibility for vnc and rsp
|
||||
|
|
Loading…
Reference in a new issue