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
|
||||
case ${cnssh_conf[method]} in
|
||||
ssh)
|
||||
sshopts[Host]="${cnssh_conf[addr]}"
|
||||
:
|
||||
;;
|
||||
sftp)
|
||||
:
|
||||
unset "cnssh_conf[cmd]"
|
||||
;;
|
||||
*)
|
||||
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]}"
|
||||
done
|
||||
) \
|
||||
"${cnssh_conf[addr]}" \
|
||||
"${cnssh_conf[cmd]}"
|
||||
|
||||
# Main
|
||||
|
@ -137,7 +138,7 @@ cnsftp() {
|
|||
|
||||
# Set sftp mode instead of ssh
|
||||
cnssh_conf[method]="sftp"
|
||||
cnssh_conf[cmd]="$*"
|
||||
cnssh_conf[addr]="$*"
|
||||
|
||||
cnssh
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue