I have 3 PCs:
- A is behind a firewall and cannot be reached from outside the local network
- B is outside the A network, has a public DNS but cannot see A
- C is a laptop without public DNS that often changes IP
I would like to create a reverse ssh tunnel from A to B in order to allow C to reach A passing through B. I read some guides and followed the procedure, but i'm doing something wrong.
I try to recap what've done.
Doing this on A
ssh -Nfg -R 2210:localhost:22 userB@B
allows me to reach A from B doing on B
ssh -p 2210 userA@localhost
To reach A from C I can do on C
ssh userB@B ssh -p 2210 userA@localhost
Until now everything looks great. Now I would like to connect from C to A directly. This is not laziness, but is (i think) required to use FileZilla from C to A.
I go back to step 1 and do on A:
ssh -Nfg -R :2210:localhost:22 userB@B
(note the ":" before 2210)
I also edited the /etc/ssh/sshd_config file on B adding at the end.
But doing on C
ssh -p 2210 userA@B
returns a timeout error.
Where I do wrong?
Thank you very much
PS: also another way to open the tunnel and allow FileZilla to connect from C to A would be ok.