reading remote files

Jp Calderone exarkun at intarweb.us
Thu Mar 13 13:23:35 EST 2003


On Thu, Mar 13, 2003 at 05:45:21PM +0000, Dag wrote:
> I'm trying to find a way to read (and possibly write) files on
> remote machines over ssh.  All that should be required on the
> remote machine is a standard ssh server (I don't want to write 
> some kind of special server for this) and all the local machine 
> should need is path and username/password combo with read access
> to the relevant file.
> 
> Ideally I'd like to be able to created some kind of remote file
> object which can be read by readlines(), failing that I'll settle
> for slurping the whole file into a list and then read through it
> that way.
> 
> I've been playing with the pyssh module a bit, but it's not very
> well documented and I'm wondering if anyone has solved a similar
> problem or if anyone has a good idea on how to tacle this.
> 

  Check out conch, an ssh client (server too, not that it sounds like you
need it) implementation that is part of Twisted.

  http://www.twistedmatrix.com/

  Jp

-- 
A sad spectacle.  If they be inhabited, what a scope for misery 
and folly.  If they be not inhabited, what a waste of space.
                -- Thomas Carlyle, looking at the stars
-- 
 up 10 days, 9:59, 3 users, load average: 0.00, 0.00, 0.00





More information about the Python-list mailing list