【发布时间】:2019-02-28 09:36:03
【问题描述】:
尝试通过 SSH 连接到 Jupyter Notebook。
我有一个通过 SSH 登录机器的脚本:
#!/usr/bin/expect -f
spawn ssh -L localhost:4000:localhost:8889 user@sshaddress.com
expect "assword:"
send "password\r"
interact
设置jupyter密码:
jupyter notebook password
# set it to something
然后我运行 jupyter:
jupyter notebook --no-browser --port=8889
然后我打开我的localhost:4000 并获得 jupyter 登录页面。
但是,在此处输入密码只会给出“无效凭据”。
为什么会这样?
【问题讨论】:
-
应该
expect "assword:"是expect "password:"? -
没有。见here。此外,这与仅用于使用 SSH 登录服务器的 Jupyter 内容无关。
标签: python ssh jupyter-notebook