logoalt Hacker News

theowaway213456yesterday at 1:15 PM5 repliesview on HN

You can tunnel a port over SSH and get a web UI locally, though it's not commonly done. I feel like more people would actually do this if tunneling a port was just ever so slightly easier (like, you're already SSH'd into a box, then you run a command, then you somehow automatically get a tunnel for that command's UI port plus a local browser window open to the page)


Replies

jasongillyesterday at 1:42 PM

While in an SSH session, press enter, then type tilde and capital C (enter ~C) and you can add command line options to the current session. To add a port forward from your local 8080 to the remote port 80 without closing the connection, do:

  enter ~C -L 8080:localhost:80
show 3 replies
yoz-yyesterday at 1:55 PM

I like TUIs because I run everything in tmux and I can just pick up work from wherever I was on any computer, phone or tablet.

show 1 reply
wolvoleoyesterday at 1:47 PM

I do this a lot but I'd still prefer TUI where possible. With too much visual content it isn't of course, but for many cases a TUI is much more responsive and much lower resource.

show 1 reply
roywigginsyesterday at 1:38 PM

Even easier is just using an X server, if you have it set up properly you just need to run the remote app and the window pops up on your machine.

(I think terminal-based GUIs are neat just for fluidity of use- you can pop one open during a terminal session and close it without switching to mouse or shifting your attention away from the terminal. They can also be a nice addon to a primarily CLI utility without introducing big dependencies)

show 1 reply
marxisttempyesterday at 2:08 PM

I'd rather use a TUI than a web UI.