<div dir="ltr">Yan,<div>Try to provide an input stream to the process. I remember seeing a similar problem.</div><div>/usr/bin/ssh -N -T -R 1022:localhost:22 <a href="mailto:uuu@example.com">uuu@example.com</a> -p 23 < /dev/null<br></div><div><br></div><div>See this post:</div><div><a href="http://stackoverflow.com/questions/19955260/what-is-dev-null-in-bash">http://stackoverflow.com/questions/19955260/what-is-dev-null-in-bash</a><br></div><div><br></div><div>Regards,</div><div>Fabrizio</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 7, 2016 at 8:03 AM, Yan Seiner <span dir="ltr"><<a href="mailto:yan@seiner.com" target="_blank">yan@seiner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 08/07/2016 07:29 AM, Yan Seiner wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a remote node that I want to administer. I want to run an ssh tunnel from that node to my router.<br>
<br>
If I start it from the command line with<br>
<br>
/usr/bin/ssh -R 1022:localhost:22 <a href="mailto:uuu@example.com" target="_blank">uuu@example.com</a> -p 23<br>
<br>
everything works fine.<br>
<br>
But if I try to run it from inittab or /etc/rc.local, it never connects. I've tried<br>
<br>
/usr/bin/ssh -N -T -R 1022:localhost:22 <a href="mailto:uuu@example.com" target="_blank">uuu@example.com</a> -p 23<br>
/usr/bin/ssh -N -R 1022:localhost:22 <a href="mailto:uuu@example.com" target="_blank">uuu@example.com</a> -p 23<br>
<br>
nothing seems to work. How do I run a tunnel automatically from an embedded box?<br>
</blockquote>
<br></span>
To clarify this:<br>
<br>
The tunnel connects, tcpdump sees packets going back and forth, but netstat on the local doesn't show the port.<br>
<br>
</blockquote></div><br></div>