Based on [1], it seems to me that this issue boils down to correctly forwarding the respective ports (as specified in the kernel .json file) over SSH. The “—ssh serveraddress” argument seems to assume you can connect to the server via SSH over port 22 without using any password or login. Not sure if configuring SSH correctly on server and client side should be handled by Spyder though…
So Matt, to come back to your question more specifically, yes you can. However, the method I tried will only work with an IPython kernel running on the server, and it requires you to have SSH configured and running on your server correctly. I tested using the method outlined in the IPython cookbook [1] on two Linux machines on the same local network and I’ll briefly repeat them here for your convenience: 0) configure sshd on the server, for some tips and tricks see for example here <https://wiki.archlinux.org/index.php/Ssh#Daemon> 1) start sshd on the server (I am using Linux with Systemd, so that means: sudo systemctl start sshd) 2) copy the kernel .json file from the server to your client 3) there are 5 ports in the json kernel file, and they all need to be forwarded from the client to the server. [1] gives a simple bash script that I’ll repeat here: #!/bin/bash for port in $(cat kernel-1256.json | grep '_port' | grep -o '[0-9]\+'); do ssh username@serveraddress -f -N -L $port:127.0.0.1:$port done Run this script on the client. Because in my case the server requires a password login for ssh, I will have to type it 5 times in a row... 4) Open Spyder on the client and make sure the current workspace directory contains the .json file you copied from the server to the client in 2) (otherwise Spyder will not be able to locate the json kernel config file which it needs to connect to your remote kernel). Connect to the remote kernel: Console > Connect to an existing kernel > enter the kernel number. And now you should be live. Note that you will have to repeat this process for each new IPython you start on the server, and the port forwarding is not preserved after a reboot. On my system, the variable explorer and object inspector did not work for the remotely connected IPython kernel. I am running IPython 1.1.0 on the server and IPython 2.0dev, Spyder 2.3dev on the client. Best regards, David [1] Connecting to a remote kernel via ssh<https://github.com/ipython/ipython/wiki/Cookbook:-Connecting-to-a-remote-kernel-via-ssh> On 18 January 2014 18:33, David Verelst <[email protected]> wrote: > As far as I understand, I don't think this is currently possible with > Spyder. I've updated issue > 1635<http://code.google.com/p/spyderlib/issues/detail?id=1635>and marked it > as a feature request. For those interested, I am trying to > dig into it a bit further and will update issue 1635 accordingly. > > Regards, > David > > > On 18 January 2014 13:07, David Verelst <[email protected]> wrote: > >> I've never tried this, but I believe you can run an IPython kernel on one >> machine and connect remotely from another. For instance, on Stackoverflow >> you have this one: >> http://stackoverflow.com/questions/18146558/connect-ipython-console-to-an-kernel-on-the-internet. >> And there is more on that in the IPython cookbook: Connecting to a >> remote kernel via >> ssh<https://github.com/ipython/ipython/wiki/Cookbook:-Connecting-to-a-remote-kernel-via-ssh>. >> There is a also issue >> 1635<http://code.google.com/p/spyderlib/issues/detail?id=1635>, >> but I don't know what the status is there since it hasn't had any response >> so far. >> >> Additionally, the IPython guys have a remote IPython multi-user notebook >> server on their >> roadmap<https://github.com/ipython/ipython/wiki/Roadmap:-IPython#release-30-summer-2014>, >> but for that you will need to have some more patience. >> >> Please let us know if this works or not, I think it would be nice to >> extend the Spyder manual on how to set this up. >> >> Regards, >> David >> >> >> On 18 January 2014 03:51, Matt Erhart <[email protected]> wrote: >> >>> I have one server-like computer that has lots of ram that I ssh to. This >>> server-like computer has a crap video card and the spyder gui is laggy via >>> ssh. Is it possible to open spyder on one computer and execute via an >>> ipython console ssh-connected to another computer? >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "spyder" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/spyderlib. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> > -- You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/spyderlib. For more options, visit https://groups.google.com/groups/opt_out.
