Specifically, on the remote machine run:-
Code: Select all
ssh –f –N –T –R 2210:localhost:22 username@yourMachine.com -p 7722
In this case, port 2210 is the tunneling port into the remote machine. Port 7722 is whatever port is being routed to port 22 in the local machine. This defaults to 22 for SSH if not specified. This will then require you to enter the password before logging in. You may be prompted to add the URL if it is the first time so for automation, the URL needs to be in the SSH list already or it might hang.
Once you have the command working, you may want to include it in /etc/rc.local to have it run upon start up.
*UPDATE: It appears that Alpine does not execute the rc.local at startup. What you need to do is to create a file inside of /etc/local.d with a .start extension. That will get run if it has an executable flag so remember to do the chmod +x command.
*UPDATE2: It appears that while we can get a command to be run by appending it to the apps.start file, it gets run before the system is fully up (eg. date is incorrect.) Now exploring appending to /media/mmcblk0p1/start.sh
On the local client, you can then use the tunnel by issuing:-
Code: Select all
ssh -p 2210 root@localhost