#!/bin/sh USER= HOST= while true; do ssh -NC -o ServerAliveInterval=5 \ -o UserKnownHostsFile=/dev/null \ -o StrictHostKeyChecking=no \ -R ':50022::22' \ $USER@$HOST sleep 5 done