4 ms·
To flesh out this response with a common way to do this, the free tier of ngrok will likely help someone accomplish this, by running it on the server to get a r
by boneitis 3y ago
To flesh out this response with a common way to do this, the free tier of ngrok will likely help someone accomplish this, by running it on the server to get a routable endpoint to your ssh port (wouldn't hurt to further lock it down with any firewalling, if that's available ngrok-side.. haven't used ngrok in a while).
For example, to run the Stable Diffusion webui (which defaults to port 7860), it would be something not too far off from:
$ ssh -p1234 -L7860:127.0.0.1:7860 assigned.dns.at.startup.ngrok.io
(IIRC ngrok free-tier will allocate you a random port on the public side every time you start the service)
Then, can just browse localhost:7860 from the remote field machine.
I got bit by the AI bug a few days ago, and I already rent some lightsail instances, one of which has a static IP reserved and one of my domain names pointing to it. So, I set up something a little more convoluted and perhaps unnecessarily complex, turning that lightsail VM into a jumpbox/bastion host. Anywho:
AutoSSH from server to my lightsail instance, with two remote port forwards (not local port forwards): SSH and SD webui. Then, connect from the field machine anywhere in the world to the jumpbox with matching local port forwards. (I set up both ports, so I can shell back into the original machine, but this isn't strictly required.)
Then, fire up localhost:7860 in the web browser. Make sure this isn't being served on 0.0.0.0 or un-firewalled.
(e: I re-read original question after posting and realized GP was merely asking for over the LAN, but hey, now they know how to do this over the 'net :)
- microbass 3y agoEven easier is to use Tailscale. Run tailscale on your laptop and server, and then access the web UI by using <tailnet_server_ip>:<port>