Skip to content

treehouses sshtunnel <add|remove|show> <portinterval> [user@url|ip] #122

@dogi

Description

@dogi
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions