cnssh: ssh doesn't support setting Host as an option
This commit is contained in:
parent
85380e3a27
commit
7e9aa6fdb5
|
@ -98,10 +98,10 @@ cnssh() { # Helper for sshing into Crestron devices
|
||||||
# Set ssh host if not using sftp mode
|
# Set ssh host if not using sftp mode
|
||||||
case ${cnssh_conf[method]} in
|
case ${cnssh_conf[method]} in
|
||||||
ssh)
|
ssh)
|
||||||
sshopts[Host]="${cnssh_conf[addr]}"
|
:
|
||||||
;;
|
;;
|
||||||
sftp)
|
sftp)
|
||||||
:
|
unset "cnssh_conf[cmd]"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown method: ${cnssh_conf[method]}"
|
echo "Unknown method: ${cnssh_conf[method]}"
|
||||||
|
@ -122,6 +122,7 @@ cnssh() { # Helper for sshing into Crestron devices
|
||||||
printf '%s %s=%s ' "-o" "$opt" "${sshopts[$opt]}"
|
printf '%s %s=%s ' "-o" "$opt" "${sshopts[$opt]}"
|
||||||
done
|
done
|
||||||
) \
|
) \
|
||||||
|
"${cnssh_conf[addr]}" \
|
||||||
"${cnssh_conf[cmd]}"
|
"${cnssh_conf[cmd]}"
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
|
@ -137,7 +138,7 @@ cnsftp() {
|
||||||
|
|
||||||
# Set sftp mode instead of ssh
|
# Set sftp mode instead of ssh
|
||||||
cnssh_conf[method]="sftp"
|
cnssh_conf[method]="sftp"
|
||||||
cnssh_conf[cmd]="$*"
|
cnssh_conf[addr]="$*"
|
||||||
|
|
||||||
cnssh
|
cnssh
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue