I have forward some ports from/to my Raspberry Pi placed behind the router with NAT and dyn-IP like this:
Everything works just fine. For some time. After couple of hours I can't connect to
After hanged ssh process is killed and the new one is launched everything is ok. Until forwarding will hangs again. Any clue, guys?
Code:
/usr/bin/ssh -24NTqf \
-i /home/root/.ssh/rpi.rsa.key \
-L 25:localhost:25 \
-R *:8888:localhost:80 \
-R *:22222:localhost:22 \
someuser@myhost.tld &
sshd
or apache
. Command shown above is still present in the ps
output on the RPi and sockstat
show that sshd on the RPi is listen on the port 25, while sshd on the outer host is listening on the ports 8888 and 22222. Everything look just perfect but no connections can be established.After hanged ssh process is killed and the new one is launched everything is ok. Until forwarding will hangs again. Any clue, guys?