Reverse SSH

Tested on CentOS, but should be applicable on Ubuntu as well.

  1. Add Epel repo, https://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/
  2. Install autossh
     $ yum install autossh
  3. Run autossh command with the following format
     $ autossh -M -fN <login@remoteserver> -R :localhost:22
     
     E.g.:
     $ autossh -M 20000 -fN support@remote.com -R 12021:localhost:22

Leave a Reply

Your email address will not be published. Required fields are marked *