For RHEL/CENTOS" yum install autossh For ubuntu: apt-get install autossh After installation :: autossh -M 0 -f -q -N -L LOCAL_PORT:REMOTE_HOST:REMOTE_PORT SSH_USER@SSH_HOST