2

I am currently working with some SSH tunnels configured. Many times when I loose connection to the Internet or hibernate my laptop, I need to reconfigure the tunnels (i.e., do killall ssh and then set up the tunnels once again).

What is the best way to automate it?

1
  • How does the system know the connection is restored? Commented Feb 20, 2015 at 9:13

1 Answer 1

4

Sounds like autossh (Automatically restart SSH sessions and tunnels) could be something for you: http://www.harding.motd.ca/autossh/

To keep tunnels alive, and to administrate them in general.

Should be on most distros base repos, so just use one of the following:

apt-get install autossh # deb pacman -S autossh # arch yum install autossh # rhel 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.