Hello,

I've written a little module on top of paramiko to use either remote
command execution, sftp_put or sftp_get. It simplifies the task.

To connect to the remote side, in case of the remote command execution,
I rely on my ssh agent in the background. But I have multiple key's on
my machine. After I switched from Mac back to Linux I'm facing a problem
with this. My key's are all set up and the keychain works fine. However,
using the module results in the seahorse (I use Ubuntu 9.04, 64bit)
pop-up Window asking me to decrypt a key. That key is not the key I use
for the connection and it is not a key that is added to the ssh-agent.

My connection is established like this in the module I wrote:

<<<
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(hostname='$host_ip',
key_filename='$path/to/key.key',username='root',look_for_keys=False)
>>>

and that is when the keyring tool pop's up and ask's me to decrypt a
complete different key. I thought by specifying a key and by setting
look_for_keys=False I pretty much narrowed the number of keys paramiko
would use down to exactly the specified one. BTW the error after
canceling the request is:

paramiko.SSHException: No existing session

I thought about using pkey instead but after I tried and created a pkey
object I get:

paramiko.PasswordRequiredException: Private key file is encrypted

Then I tried skipping the wrapper and using paramiko.Transport to do the
connec. But After having the right key to use I get:

RuntimeError: thread already started

How to go about this? How to tell paramiko to use the specified key and
no other? I hope someone can help me or point me in the right direction.

Regards
Philipp

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
paramiko mailing list
[email protected]
http://www.lag.net/cgi-bin/mailman/listinfo/paramiko

Reply via email to