I don't know the right words to describe what is going wrong when this happens. Yet, the Raspberry Pi SSH connection remains perfectly fine, capable of running commands on the server. That is, the command ssh localhost -p 19999 results in an error message like the following: ssh: connect to host localhost port 19999: Connection refused However, occasionally I have found that this listing on the server vanishes while the Raspberry Pi maintains its SSH connection to the server. This normally works just fine and, on the server, a command like netstat -all -timers -program -numeric | egrep '127.0.0.1:*(LISTEN|.*)' | sort lists the reverse SSH connection as something like this: tcp 0 0 127.0.0.1:19999 0.0.0.0:* LISTEN 2972/5 off (0.00/0/0) So, I can connect to the Raspberry Pi by SSHing to the server and then running a command like the following: ssh localhost -p 19999 The part 19999:localhost:22 basically means that all traffic on port 19999 on the server should be forwarded to port 22 of the Raspberry Pi. To connect to the server, the Raspberry Pi runs a process like this: while true do Imagine that this Raspberry Pi is on the difficult-to-access roof of a building in another country (perhaps while a storm is in progress), so I want its connection to be reliable. Kali Linux "The quieter you become, the more you are able to hear.I have a remote Raspberry Pi computer that connects from behind its restrictive firewall to my server by reverse SSH tunnel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |