use SSH to connect the VHUSB

I have PC(192.168.0.55), host server(100.111.111.111), pi (192.168.1.2 or when in the same router 192.168.0.44)

when the pi and the PC under same router, the Virtual Here Share USB over Internet could easily find the shared usb ip: 192.168.0.44:7575, and it works perfect.

Now, I made Pi connect with a different network. its internal ip changed to 192.168.1.2 and the public ip also changed for sure.

I think use SSH is kind of the best solution, and I actually do not quite know other solutions.

Pi -> Server -> PC

pi has ssh port 22 and 7576 server has ssh port 22 and 7576

on pi: sudo ssh -R 7599:localhost:7576 user@100.111.111.111 (this connection succeed )

on PC: used putty to set the command, set tunnel used local with port 7599, and the host is 100.111.111.111 and port is 22. the command might like this: ssh -L 22:localhost:7599 root@100.111.111.111 (i could login by enter root password) and i can use ssh -p 7599 pi@localhost to remotely login pi

But I do not know what should I do now. How to find the ip of the pi.

The goal is my PC side USB Virtual Here could find the ip of the Pi shared USB over internet.

Am I on the right track?

Have been cost a week on this. Feel really stressful. Really need help.

Thanks you all in advance.

#2

And for sure, I do not mind use other methods. such as SSL mentioned by virtualhere. I just not really know how to use it correctly like ssh.

#3

1. Find the external ip of your network
2. Go to your router and map port 7575 to the Internal IP address of your pI
3. From the client running outside the network, right click USB Hubs->Specify IP and put in the external IP address of your network in there.

Then the virtualhere client will open that ip address, your router will forward port 7575 to your internal pi and it will communicate like normal.

#4

I have a situation that might need the use of ssh to establish contact between client and server.
The server is placed in my cabin and my ISP has closed all inbound ports.
The client is running on my PC on my home or office network which both have no open inbound ports.
What seems to be the solution is to setup a ssh-server that can be contacted from two sides; setting up a tunnel.
If you have another solution give me a hint.

Regards
Kjartan

#5

I think you need to try a vpn type service first. Since you are quite well firewalled you will need something that can do UDP holepunching that then sets up reasonably fast UDP tunnel using that (do not use a relay server it will be too slow). Perhaps try https://www.zerotier.com