Pyro4 over SSH (native SSH or paramiko)

Stuart Longland <stuartl-3e+Fe6x+Dsh6S/UX/[email protected]>
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
Hi all,

Just a silly question, has there been any further progress on
integrating support for SSH transport into Pyro4?  I see it is listed as
a TODO item.

I'm currently looking at ways to remotely access data on another system.

At my workplace I developed a energy management metering data collection
toolkit which is able to rat out data from various energy management
systems and collect it for upload into completely disparate systems for
integration purposes.  i.e. we can take energy data from a Satec meter
connected via MODBUS (using pymodbus) and push that into ION Enterprise.
 The framework is written in Python.

The systems almost always have a ssh daemon running.  Even on a Windows
box, this is not hard to organise.

It'd be nice if my code could fire up a SSH client, log into some remote
host, launch the Pyro4 server, then launch the Pyro4 client locally.
Then I'd be able to retrieve data that's visible to the remote host, and
view it on a local display or push it to another remote host.  Pyro4
looks like the most natural way to do it.

Two ways come to mind to achieve this:
Method (1):
	1. Log in to the remote host with paramiko, start the server and parse
its stdout output to figure out the remote host port
	2. Instruct paramiko to forward this remote port to the local end
	3. Rewrite the URL from the remote host to reflect the local port
number and host
	4. Point the Pyro4 client at this local port

Method (2):
	1. Log into the remote host with either paramiko or command line SSH,
obtaining the stdin and stdout streams.
	2. Pass these streams to the Pyro4 client

Method (2) is perhaps more general, the pipe need not be ssh, it could
be a serial link for example.  I'm not sure if Pyro4 is launching
multiple connection threads, or just one.

Has anyone had any thoughts on this?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.