Enable keepalives in Plink

Instead of a keepalive that plink manages internally, another option is to use the shell that is created on the host to keep sending short bits of data on the wire. This can be done through a very simple shell script such as:

while true;
do echo 0;
sleep 30s;
done

This very simple bash script will write the character 0 every 30 seconds to the screen.

A full example of the whole command line when invoking plink:

plink -P 443 [user@]host.com -R *:80:127.0.0.1:80 -C -T while true; do echo 0; sleep 30s; done

Plink does not have any command-line option for keepaliaves.

All you can do is to configure a stored session in PuTTY GUI with the keepalive on and then re-use the session in Plink using -load switch.