Sample Header Ad - 728x90

How to connect two phones via SSH with a central SSH server?

2 votes
1 answer
1750 views
I have two phones A and B which use Mobile Data. I would like to connect from phone A to phone B, the latter has an SSH server running on port 8022. The central SSH server is running on AWS and has an Elastic IP. Phone A can connect to AWS Server directly at port 22, so can phone B. AWS Server configuration:
GatewayPorts yes
TCP forward yes
Password Authentication Yes
Further, I have forwarded port 9099 on the AWS SSH server to local port 8022 on phone B:
~$ ssh -NR 9099:localhost:8022 user@Remoteip
By running netstat -tpln on the AWS SSH server, I can see that 9099 is in listening mode. But when I ssh from phone A into the AWS server at port 9099, it says timed out.
Asked by Ehtizad Zashkiyor (83 rep)
Jul 16, 2019, 12:27 PM
Last activity: Sep 1, 2022, 08:11 AM