Re: How to realize ssh & scp in Python
Rather than doing anything with passwords, you should instead use public
key authentication. This involves creating a keypair with ssh_keygen,
putting the private key on the machine opening the ssh connection
(~/.ssh/id_rsa), then listing the public key in the remote system's
If you don't want to use this approach, `pexpect' is supposed to be able
to perform this sort of tasks, and one of its examples is called
`sshls.py'. I just downloaded it, and after changing the ssh
commandline to include
-o 'PreferredAuthentications password'
it worked for me. In another recent thread, a different poster claimed
it didn't work, so your results may vary.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-----END PGP SIGNATURE-----
|All times are GMT. The time now is 05:14 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.