我的实验室在服务器上运行 RStudio。几周前,我在表弟家里成功通过 ssh 连接到服务器,并通过本地 Firefox 浏览器启动了服务器端 RStudio。现在,当我尝试从家里访问服务器 RStudio(通过我自己的路由器)时,它不起作用。我需要帮助进行故障排除,我猜这是路由器上的问题。我运行的是 Mac OSX 10.6.8。不知道大学服务器正在运行什么,但我不认为这是服务器端问题。
这是我第一次在我表弟家里做的时候的工作原理:首先,我通过 VPN 连接到大学网络;然后我调用带端口转发的 SSH;然后我打开 Firefox 浏览器,连接到本地主机端口,它会在服务器端打开 RStudio,我可以通过本地浏览器窗口访问它。
这是我尝试从家庭网络登录时遇到的问题:
我可以成功连接 VPN。我还可以使用以下命令成功设置 SSH:ssh -v -L 8783:localhost:8783 [email protected] /cdn-cgi/l/email-protection
以下是成功 ssh 命令的详细输出的最后几行:
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:8783 forwarded to remote address localhost:8783
debug1: Local forwarding listening on 127.0.0.1 port 8783.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on ::1 port 8783.
debug1: channel 1: new [port listener]
debug1: channel 2: new [client-session]
debug1: Entering interactive session.
Last login: Mon Sep 2 04:02:40 2013 from vpnipaddress
所以我认为我在 VPN 和 SSH 阶段仍然取得了成功(尽管我不知道为什么它说我上次登录是 9 月 2 日,而从那以后我已经登录了几次)。
接下来,我打开 Firefox,输入 localhost:8783,但我没有通过浏览器窗口获取 RStudio 服务器应用程序,而是收到以下错误:
在 Firefox 浏览器窗口中,显示:找不到服务器,Firefox 无法在 www.localhost.com 找到服务器,请检查地址是否有输入错误等。
在终端窗口中,它显示:
debug1: Connection to port 8783 forwarding to localhost port 8783 requested.
debug1: channel 3: new [direct-tcpip]
channel 3: open failed: connect failed: Connection refused
debug1: channel 3: free: direct-tcpip: listening port 8783 for localhost port 8783, connect from 127.0.0.1 port 50420, nchannels 4
我不确定我做错了什么。自从上次成功连接以来,我没有对笔记本电脑进行任何更改。我使用的是我自己的路由器(而不是我表弟的),所以也许我需要搞乱防火墙?我已经允许端口 22 和 8783 通过防火墙到达我的笔记本电脑(但我什至不确定是否需要这样做)。帮助?