在浏览器中打开 localhost 引用另一台机器

dju*_*rez 1 remote firefox remote-desktop

我目前在 Centos 机器上的本地主机上运行一项服务。我无法改变它。

我想在我的本地机器上打开 Firefox 以打开那个 URL,因为 Centos 机器没有用户界面而我的本地机器有。

我尝试使用它,但没有用:

ssh -Y <user>@<centos_machine> firefox --no-remote

Error: GDK_BACKEND does not match available displays
Run Code Online (Sandbox Code Playgroud)

Centos 机器上安装了 Firefox。

exe*_*ral 5

ssh -L 8080:localhost:80 centos_machine
Run Code Online (Sandbox Code Playgroud)

http://localhost:8080上启动浏览器

它指向 centos_machine:80