sshuttle
Redirect traffic from local PC to private subnet:
bash code snippet start
sshuttle -r "root@${host_ip}" "10.3.0.0/24"bash code snippet end
jq
Bash json parsing utility. Examples:
bash code snippet start
jq '.resources[] | select(.name == "bastionHost") | .instances[0].attributes.ipv4_address' ./file.jsonbash code snippet end
-r option helps to without quota output.
Connection ping without telnet
bash code snippet start
timeout 5 bash -c 'cat < /dev/null > /dev/tcp/10.22.32.20/5701'; echo $?bash code snippet end