Skip to content

SSH Port Forwarding

Ajmal edited this page Jul 2, 2021 · 5 revisions

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

Node Errors:-

Node Version Manager : Using brew

https://medium.com/@katopz/how-to-install-specific-nodejs-version-c6e1cec8aa11

ENOSPC: System limit for the number of file watchers reached, watch

https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details

while loading shared libraries: libicui18n.so.64: cannot open shared object file: No such file or directory

https://stackoverflow.com/questions/55097675/node-error-while-loading-shared-libraries-libicui18n-so-62-cannot-open-shared

Flutter HandTips : -

Form Fields Prefilling from an API Call, in a simple way (Small Delay Expected)

https://stackoverflow.com/questions/59269947/how-to-display-user-data-in-an-edit-form-using-flutter

Django Workarounds

Query using subquery and distinct uniqueness overloaded (><)

https://stackoverflow.com/a/56333533/9301191

R for Debian

Installation and Updation

http://scottsfarley.com/research/cloudcomputing/2016/07/19/Updating-R-on-Debian.html

Clone this wiki locally