ssh - 尝试通过 ssh 隧道访问远程 jupyter notebook

标签 ssh putty jupyter-notebook tunnel

我需要一些帮助来访问远程 jupyter 笔记本实例

通常,当我尝试访问在我的 mac 上的远程服务器上运行的 jupyter notebook 时,我会在终端窗口中编写以下内容来创建隧道

ssh -NL $local_port_number:localhost:$remote_port_number $my_username@$remote_server

之后,我通常可以在 http://localhost:local_port_number 访问 jupyter 服务器。

我如何在 Windows 上的腻子中执行此操作?我知道 connection>>ssh>>tunnels 中有一些选项可以执行此操作,但到目前为止我无法使配置正常工作。

最佳答案

在远程主机中,打开终端,将目录更改为您拥有笔记本的位置并键入:

jupyter notebook --no-browser --port=8889

# you should leave the this open

在本地计算机上,打开 MS-DOS cmd(如果使用 Windows)或 Unix 终端,然后键入:
ssh -N -f -L localhost:8888:localhost:8889 username@your_remote_host_name

# make sure to change `username` to your real username in remote host
# change `your_remote_host_name` to your address of your working station
# Example: ssh -N -f -L localhost:8888:localhost:8889 laura@cs.rutgers.edu

现在打开网络浏览器(google chrome、firefox 等)并输入:
localhost:8888
# you will see your notebooks in your given directory

从:
http://amber-md.github.io/pytraj/latest/tutorials/remote_jupyter_notebook

关于ssh - 尝试通过 ssh 隧道访问远程 jupyter notebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37425784/

相关文章:

java - 使用 Selenium Webdriver 运行基于 Web 的 SSH CLIENT PLUGIN 脚本的自动化

windows - 使用 PuTTY 作为本地终端仿真器?

Jupyter IRKernel 中的 readline()

c - 找不到导出命令(使用 putty)

vba - 打开 PuTTY 并在服务器上运行 shell 脚本

python-3.x - 谷歌Colab : API error in opening up Python notebooks?

python - 使用 Azure 和 Jupyter Notebook 进行面部识别

linux - 在获取 .bashrc 后,如何在使用 ssh 登录时在远程执行命令?

hadoop - Hadoop 3.0.3-权限被拒绝(公钥,gssapi-keyex,gssapi-with-mic,密码)

ssh - PhpStorm ssh 隧道到远程服务器 - 在远程服务器上需要配置什么?