Hello! I'm trying to implement the example in the Conch tutorial (http://twistedmatrix.com/projects/conch/documentation/howto/conch_client.html). with some modifications.

I want to do the following:

1) Connect to a remote machine using a private key (no password) without knowing the public key
2) Transfer over some files
3) Issue a series of non-interactive commands (to fire up the scripts I transferred over)
4) Close the connection


Step 2) I can easily do with a single non-interactive subprocess.Popen() call to SCP; if there was a way to do it in pure Twisted-Python that would be great, but i'm not too worried about that.

Step 1) Is really bugging me here; I can't seem to strip the need for foreknowledge of the public key from the script. I can't easily programmatically access that information in my use case. I do however have ready access to the private key and fingerprint for verification. My modified tutorial scripts just vomit.

Step 3) Is a just a little annoying; The provided tutorial only issues one command and reads the stdout.  I don't care about stdout in my use-case, but i do care about issuing a series of commands. i could just issue one long command with the indivudal subcommands seperated by semicolons (cat blah; start-script myscript; [etc]) but i'm wondering for curiosity/cleanliness' sake if there's a way of seperating the commands.

Any help would be much appreciated =]

Regards,

Pumpkin