File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,19 +5,19 @@ filename="/tmp/$id.json"
55
66ssh_options=()
77
8- port=$( jq -r .port $filename )
8+ port=$( jq -r .port $filename 2> /dev/null )
99if [ -n " $port " ]; then
1010 ssh_options+=(-p $port )
1111fi
1212
13- password=$( jq -r .password $filename )
13+ password=$( jq -r .password $filename 2> /dev/null )
1414if [ -n " $password " ]; then
1515 TMP_PASS=$( mktemp)
1616 echo " $password " > $TMP_PASS
1717 sshpass_command=" sshpass -f $TMP_PASS "
1818fi
1919
20- key=$( jq -r .key $filename )
20+ key=$( jq -r .key $filename 2> /dev/null )
2121if [ -n " $key " ]; then
2222 TMP_KEY=$( mktemp)
2323 echo " $key " > $TMP_KEY
@@ -26,6 +26,6 @@ if [ -n "$key" ]; then
2626fi
2727
2828
29- destination=$( jq -r .destination $filename )
29+ destination=$( jq -r .destination $filename 2> /dev/null )
3030
3131exec $sshpass_command ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no " ${ssh_options[@]} " " $destination "
You can’t perform that action at this time.
0 commit comments