Yun ssh to third party box with public keys:

Setup ssh using public keys

Testing ssh at Yun:

ssh [email protected] -i /root/.ssh/id_rsa

Testing reverse ssh at Yun:

ssh -R 2222:localhost:22 [email protected] -i /root/.ssh/id_rsa

Testing Linux box (ssh to Yun) :

ssh localhost -p 2222

Setup autossh:

opkg update 
opkg install autossh
ln -s  /root/.ssh /.ssh
nano /etc/config/autossh
config autossh
        option ssh      '-i /root/.ssh/id_rsa  -N -T -R 2222:localhost:22 [email protected]'
        option gatetime '0'
        option monitorport      '20000'
        option poll     '600'
/etc/init.d/autossh enable
/etc/init.d/autossh start



Testing Linux box (ssh to Yun) :

ssh localhost -p 2222

At Yun:

reboot

Testing Linux box (ssh to Yun) :

ssh localhost -p 2222

Comments powered by CComment