# init watchdog & configuration



## izotov (Feb 2, 2010)

Hi,
I looked for a simple watchdog-like functionality in FreeBSD to start and keep running SSH tunnels. I found that init can do that if I specify the SSH connection commands in /etc/ttys.

I would like to set up 150-200 tunnels and for each I use a line like this:


```
ttyv10   "/usr/bin/ssh -l syslog -i /home/syslog/.ssh/id_rsa -nNTx -R 514:127.0.0.1:514 192.168.0.1 >/dev/null 2>&1"                unknown on  secure
```


Now I have two questions:

1., Is this solution safe (as it is using init as watchdog which is the heart of the processes)? Is it good at all? Or is there something better?

2., Is it possible (and how) to configure the delay between retries and some other parameters? For example if a connection is down I get:

```
getty repeating too quickly on port /dev/ttyv10, sleeping 30 secs
```
What to do if I want it to sleep for 5 minutes?

Any help would be appreciated!


----------

