
Chapter 5. Configuring an EAM-based watchdog
It is possible to use the EAM's pppd-watchdog facility to reboot a Routerboard each time the connection is lost. This technique relies on password-less ssh access.
The following procedure needs to be carried out using the EAM terminal interface as described in the EAM manual (MAN-EAM-0003).
5.1 Automating SSH access
Generate a new DSA key on the EAM (with an empty passphrase) by entering the command:
ssh-keygen -t dsa
When prompted for filename and passphrase, just hit enter for the defaults, as shown in the following example:
eam711 ~ # ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
3e:b2:a8:e8:81:a5:71:b8:7d:d3:e0:fb:c6:8f:02:7a root@eam711
Upload the DSA key to the Routerboard via FTP using the command:
ftpput -vu admin -p rootme 192.168.88.1 id_dsa.pub ~/.ssh/id_dsa.pub
Note: rootme is the default routerboard password. If no password has been set, use two single quotes with no space between:
ftpput -vu admin -p '' 192.168.88.1 id_dsa.pub ~/.ssh/id_dsa.pub
The screen will display the ftp details as shown in the following example:
eam711 ~ # ftpput -vu admin -p rootme 192.168.88.1 id_dsa.pub ~/.ssh/id_dsa.pub
Connecting to 192.168.88.1 (192.168.88.1:21)
ftpput: cmd (null) (null)
ftpput: cmd USER admin
ftpput: cmd PASS rootme
ftpput: cmd TYPE I (null)
ftpput: cmd PASV (null)
ftpput: cmd STOR id_rsa.pub
ftpput: cmd (null) (null)
ftpput: cmd QUIT (null)
Register and activate the DSA key on the Routerboard:
ssh admin@192.168.88.1
Password: …
/user ssh-keys import
id_dsa.pub
User: admin
It is now possible to connect to the Routerboard using the command:
ssh admin@192.168.88.1
5.2 Automating LTE link reset
Once ssh access is automated on the EAM, the following command will reset the lte link without requiring a system reboot:
ssh admin@192.168.88.1 '/interface disable lte1 ; /interface enable lte1'
5.3 Setting up the pppd watchdog
Use the EAM web interface to set up the pppd-watchdog as described in the EAM manual (MAN-EAM-0003).
Configure the following (typical) parameters:
Daemon startup delay: 180
Test command: /bin/ping -c 5 gstm.guralp.com
Time between tests: 10
Kill command: /bin/true
Force kill count: 3
Force Kill command: usr/bin/ssh admin@192.168.88.1
'/interface disable lte1; /interface enable lte1'