简体   繁体   English

从Windows qtconsole到远程iPython内核的iPython ssh

[英]iPython ssh from Windows qtconsole to a remote iPython kernel

I want to run an iPython kernel on a Linux box and then connect to it remotely on a windows machine. 我想在Linux机器上运行iPython内核,然后在Windows机器上远程连接到它。 The ipython kernel works fine and I can connect a qtconsole to it locally on the Linux box. ipython内核工作正常,我可以在Linux机器上将qtconsole本地连接到它。 On Windows I have installed ipython and paramiko as its ssh client. 在Windows上,我已经将ipython和paramiko安装为它的ssh客户端。 I run the following command on Windows 7 x64 cmd 我在Windows 7 x64 cmd上运行以下命令

D:\...\.ssh>ipython qtconsole --IPythonConsoleApp.sshserver='user@hostname:22' --IPythonConsoleApp.sshkey='myKey' --IPythonConsoleApp.password='1234'

I get the following error: 我收到以下错误:

[IPythonQtConsoleApp] Could not setup tunnels
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\IPython\frontend\consoleapp.py", line 289, in init_ssh
    newports = tunnel_to_kernel(info, self.sshserver, self.sshkey)
  File "C:\Python27\lib\site-packages\IPython\lib\kernel.py", line 245, in tunnel_to_kernel
    if tunnel.try_passwordless_ssh(sshserver, sshkey):
  File "C:\Python27\lib\site-packages\IPython\external\ssh\tunnel.py", line 87, in try_passwordless_ssh
    return f(server, keyfile)
  File "C:\Python27\lib\site-packages\IPython\external\ssh\tunnel.py", line 123, in _try_passwordless_paramiko
    look_for_keys=True)
  File "C:\Python27\lib\site-packages\paramiko\client.py", line 332, in connect
    self._auth(username, password, pkey, key_filenames, allow_agent, look_for_keys)
  File "C:\Python27\lib\site-packages\paramiko\client.py", line 493, in _auth
    raise saved_exception
SSHException: not a valid DSA private key file

The key is even created with RSA. 密钥甚至是使用RSA创建的。

Has anybody had a success in connecting remotely from a Windows machine to a remote ipython kernel? 从Windows机器远程连接到远程ipython内核是否有人成功?

You say 你说

The key is even created with * R *SA. 甚至使用* R * SA创建密钥。

but

SSHException: not a valid * D *SA private key file SSHException:不是有效的* D * SA私钥文件

RSA and DSA are different algorithms. RSA和DSA是不同的算法。

Either create a DSA private key file, or configure ipython to use RSA. 创建DSA私钥文件,或将ipython配置为使用RSA。

(I am not familiar with ipython, so cannot advise on the specifics. Sorry.) (我不熟悉ipython,因此无法提供具体建议。对不起。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM