Remote access to ssh server

Andrew Bennetts andrew-pythonlist at
Wed Jan 8 14:07:40 CET 2003

On Wed, Jan 08, 2003 at 01:35:18PM +0100, Yar3k wrote:
> Is there any possibility for Python script to remote connection with
> ssh server? I want to connect to remote server, execute some commands
> and logout. All should be done automaticly (like using ftp client
> which is the part of standard Python library).


Twisted <> has python implementations of an ssh
client and server, and I believe it can do this.  It can also do other wacky
stuff like connection forwarding.  It's called "conch".

On the other hand, you should be able to do it pretty easily with the
standard OpenSSH client, so you might find it easier to simply call
os.system("ssh user at host some_command"), depending on what you're doing.


More information about the Python-list mailing list