summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8a9614c)
22000 is used by syncthing, and it resets the connection. Specifically
search for a refused connection.
shift
# determine ssh forward port
ssh_port=22000
shift
# determine ssh forward port
ssh_port=22000
-while echo '' | nc localhost $ssh_port >/dev/null; do
+until echo '' | nc localhost $ssh_port 2>&1 >/dev/null | grep -q 'Connection refused'; do
ssh_port=$((ssh_port+1))
done
echo "Host ssh port: $ssh_port"
ssh_port=$((ssh_port+1))
done
echo "Host ssh port: $ssh_port"