default is ole@pirate.ole.org
#check if there already key in /root/.ssh
#if not create 3 times ENTER = no password
ssh-keygen
### output command
cat /root/.ssh/id_rsa.pub
# put ssh daemon key of <url|ip> into
# /root/.ssh/known_hosts
###ssh <user>@<url|ip>
###yes
vim /etc/tunnel
#!/bin/bash
/usr/bin/autossh -f -T -N -q -4 -M23000 -R 23022:127.0.1.1:22 -R 23084:127.0.1.1:5984 -R 23080:127.0.1.1:80 ole@pirate.ole.org
chmod +x /etc/tunnel
vim /etc/rc.local
/etc/tunnel
vim /etc/cron.d/autossh
MAILTO=root
*/5 * * * * root if [ ! "$(pidof autossh)" ]; then /etc/tunnel; fi