scp module for python ?
Andrew McGregor
andrew at indranet.co.nz
Tue Feb 11 18:50:15 EST 2003
--On Tuesday, February 11, 2003 09:44:14 +0100 Gitte Wange
<gitte at babytux.dk> wrote:
> Well I also thought of calling the scp command with os.system but I want
> to use scp in a webapplication (for Zope) and then I need to feed the
> password to the scp command and I haven't been able to find out how to do
> that :-(
> Any hints on this ?
1) (simple, not very secure) Use a certificate login with no password.
You're trusting your web server in any case, so this can actually be more
secure; compromising the server doesn't automatically compromise the
password.
2) (better) Use ssh-agent to hold a decrypted cert. This means that the
startup procedure for the server will include entering the password, but
then it isn't stored on the system anywhere.
3) (complicated, perhaps not very secure) Write a replacement for
ssh-askpass that will do the right thing.
This is hard because it's a bad idea from a security point of view.
You would actually be better for security to script the other host, which
is presumably in a less hostile network environment, to poll the webserver
and download the files. In which case, it might be easier to use https.
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030212/0370284e/attachment.sig>
More information about the Python-list
mailing list