In case anyone has the same issue, I managed to struggle my way through 
this:

You can use the current version of rpyc, in combination with plumbum. 
Plumbum provides a 'PuttyMachine', which can be used to connect to the 
remote server and create a tunnel. However, for some reason the 
PuttyMachine.tunnel causes errors which I was not able to solve. I started 
out by setting up my own tunnel from command-line, and retrofitted this to 
plumbum.

My solution now looks like this:

keyfile = "key"
local_port = 1111
remote_port = 18861
remote_ip = "x.x.x.x"
remote_user = "user"
ssh_command = plumbum.local["C:\Program Files 
(x86)\PuTTY\plink.exe"][('-L','{}:localhost:{}'.format(local_port,remote_port))]
scp_command = plumbum.local["C:\Program Files (x86)\PuTTY\pscp.exe"]

remote = plumbum.PuttyMachine(remote_ip, user=remote_user, port=22, 
keyfile=keyfile,ssh_command=ssh_command, scp_command=scp_command)
with remote:
    conn = rpyc.connect("localhost", local_port)
    # Do rpyc stuff here





On Wednesday, September 9, 2015 at 7:24:06 PM UTC+2, ldogs wrote:
>
> I'm having trouble implementing an SSH-tunnel, following 
> http://rpyc.readthedocs.org/en/latest/docs/secure-connection.html
>
> Specifically rpyc.utils.ssh doesn't exist, so that I can't import 
> SshContext. I have ssh for python installed.
>
> Things I've tried so far:
>
>    - Windows (8.1) and Linux (Ubuntu 14.04)
>    - Different version of rpyc (pip install -Iv rpyc==3.22)
>    - Different version of Python (2.7 and 3.4)
>
>
> Any suggestions on how to get the correct version of rpyc?
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"rpyc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to