I'm running dbclient from init script with arguments -y -NT -R $PORT:localhost:22 -i $KEY
07.08.2016, 16:09, "Yan Seiner" <[email protected]>: > No joy. I've now tried various combinations of -N -t -T and < /dev/null and > tcpdump shows the remote making the connection, but the forwarded port never > appears. :( Starting it from inittab or rc.local seems to interfere with it > being able to forward. I'm not that familiar with the startup process so what > is missing at that point? > > On 08/07/2016 08:18 AM, Fabrizio Bertocci wrote: >> Yan, >> Try to provide an input stream to the process. I remember seeing a similar >> problem. >> /usr/bin/ssh -N -T -R 1022:localhost:22 [email protected] -p 23 < /dev/null >> >> See this post: >> http://stackoverflow.com/questions/19955260/what-is-dev-null-in-bash >> >> Regards, >> Fabrizio >> >> On Sun, Aug 7, 2016 at 8:03 AM, Yan Seiner <[email protected]> wrote: >>> On 08/07/2016 07:29 AM, Yan Seiner wrote: >>>> I have a remote node that I want to administer. I want to run an ssh >>>> tunnel from that node to my router. >>>> >>>> If I start it from the command line with >>>> >>>> /usr/bin/ssh -R 1022:localhost:22 [email protected] -p 23 >>>> >>>> everything works fine. >>>> >>>> But if I try to run it from inittab or /etc/rc.local, it never connects. >>>> I've tried >>>> >>>> /usr/bin/ssh -N -T -R 1022:localhost:22 [email protected] -p 23 >>>> /usr/bin/ssh -N -R 1022:localhost:22 [email protected] -p 23 >>>> >>>> nothing seems to work. How do I run a tunnel automatically from an >>>> embedded box? >>> >>> To clarify this: >>> >>> The tunnel connects, tcpdump sees packets going back and forth, but netstat >>> on the local doesn't show the port. -- Regards, Konstantin
