SSH Port Forwarding - muhammed-ajmal/Install-Config GitHub Wiki

Scenario: -

AVD is Running and listening at 127.0.0.1:5555 & 0.0.0.0:5555 but not in the device IP. 192.168.1.5

myhome wifi network assigned this IP for my machine.

I need this ip for my development env running in vscode remote-container.

Solution 1 [Using Open SSH]:-

Install SSH server

sudo apt install openssh-server

ssh -g -L 8012:localhost:5555 -f -N [email protected] > 8012 can be any available random port

adb connect 192.168.1.5:8012

done

in my container now

https://unix.stackexchange.com/questions/10428/simple-way-to-create-a-tunnel-from-one-local-port-to-another

Solution 2 [Using Ngrok]:-

ngrok tcp 5555

ngrok by @inconshreveable                                       (Ctrl+C to quit)
                                                                                
Session Status                online                                            
Account                       <masked> (Plan: Free)                  
Version                       2.3.40                                            
Region                        United States (us)                                
Web Interface                 http://127.0.0.1:4040                             
Forwarding                    tcp://2.tcp.ngrok.io:13890 -> localhost:5555      
                                                                                
Connections                   ttl     opn     rt1     rt5     p50     p90       
                              0       0       0.00    0.00    0.00    0.00 

adb connect 2.tcp.ngrok.io:13890

⚠️ **GitHub.com Fallback** ⚠️