Hi. I want to create a script to read a file placed in a remote linux server using python..need help..?
Roy Smith
roy at panix.com
Fri May 2 18:51:29 EDT 2014
In article <lk16di$854$1 at dont-email.me>,
Denis McMahon <denismfmcmahon at gmail.com> wrote:
> Method b:
>
> Use telnet to login to your account on the other server, run the script.
Ugh. I hope nobody is using telnet anymore. Passwords send in plain
text over the network. Bad. All uses of telnet should have long since
been replaced with ssh.
One of the cool thinks about ssh is that not only does it give you
remote shell connectivity, but it can be used to execute commands
remotely, over the same secure channel. There is an awesome python
package called fabric (http://www.fabfile.org/) which makes it trivial
to do this inside of a python program. You can use it as a command-line
tool, or as a library embedded in another python script.
More information about the Python-list
mailing list