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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s