Using SSH_ASKPASS to enter passwords

snippet

%3 cluster_2d01dbbd_2f9c_4df8_b2cb_5f50871b2375 Using SSH_ASKPASS to enter passwords _31b7f0f4_8bcf_4473_ae86_80575c024517 SSH _ea48ec1d_f9d4_4fb7_b39a_faa7b6e2ba95 Notes index _ea48ec1d_f9d4_4fb7_b39a_faa7b6e2ba95->__0:cluster_2d01dbbd_2f9c_4df8_b2cb_5f50871b2375 __1:cluster_2d01dbbd_2f9c_4df8_b2cb_5f50871b2375->_31b7f0f4_8bcf_4473_ae86_80575c024517

Use this to non-interactively enter passwords for SSH hosts.

#!/bin/sh
# Remember to chmod +x
echo "password"

export SSH_ASKPASS=/usr/bin/ssh_tunnel_askpass.sh
export DISPLAY=:-

# `setsid` and `autossh` are not required, but if you're going to do this non-interactively, let's to it right
setsid autossh -M 0 -N -R 9999:127.0.0.1:22  -o StrictHostKeyChecking=false tunnel@codigoparallevar.com