-
-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connecting via SSH tunneling #242
Comments
The SSH commands are correct (but you can create both tunnels at once: #144 (comment)). It works correctly for me. Did you |
Thanks for the response. Yes I made sure of that, the adb connection works flawlessly. |
My setup is as follows. A windows machine with the scrcpy client, a linux box with a only the same version of adb and a phone connected to it. Maybe the linux box needs scrcpy? But I don't think so, it should just act as an intermediary. |
This is good (except the Windows part ).
No, it does not. I tested between 2 Debians, these port forwardings are sufficient to make it work:
According to your results, I would say that the remote port forwarding does not work as expected. Maybe a firewall or something. |
Ok, please let me know if you ever decide to investigate this scenario using a windows box. Specifically I am using the version of OpenSSH bundled into the latest windows updates. |
I have currently no windows to test, but try a simpler scenario which does not involve scrcpy. On your Windows machine:
In another terminal on the same machine:
Then, on your remote machine:
Then type stuff and press Return. If the text is printed on your local machine (as the result of |
Thanks so much for your help I got it working. This is my solution for anyone who stumbled upon this. OpenSSH for windows does not completely support tunnels yet, use Putty. The guide is used to set it up is below. |
I apologize if I'm missing something. I'm attempting to make this connection over a network using SSH tunneling.
I'm setting up a local tunnel to the remote adb and then a remote tunnel from the remote scrcpy port (27183) to local using these commands:
ssh -L 5037:localhost:5037 user@<remote_ip>
ssh -R 27183:localhost:27183 user@<remote_ip>
I can successfully access ADB remotely, however when I run scrcpy it stops at "...jar 1 file pushed...". The device is running the server but it just seems like the tunnel back isn't working sufficiently.
scrcpy works on my local machine just fine and the adb reverse executes succesfully to the right port.
Update:
Adding the
ssh -L 27183:localhost:27183 user@<remote_ip>
tunnel produces the error: "accept: too many files".The text was updated successfully, but these errors were encountered: