ssh.PasswordRequiredException: Private key file is encrypted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
paramiko |
New
|
Undecided
|
Unassigned |
Bug Description
I already put this bug on stackoverflow, but didn't get any response, in digging further, I found this site, so I'm reporting it here:
Firstly I tried to get fabric working, but it kept asking me for a password.
So I'm trying to reduce the problem. Perhaps it would be a good POC to just create a SSH connection from Python. I discovered that fabric uses parmiko for it's SSH handling. Hmm. Ok, lets try to get an example working.
Here's what I wrote.
from ssh import *
import os
print "SSH-AGENT VARS"
print "SSH_AGENT_PID: %s " % os.environ[
print "SSH_AUTH_SOCK: %s " % os.environ[
a = Agent()
keys=a.get_keys()
print keys.count(
client = SSHClient()
client.
client.
Resulting in the following error messages:
% ./ssh_test.py
SSH-AGENT VARS
SSH_AGENT_PID: 26557
SSH_AUTH_SOCK: /tmp/ssh-
0
Traceback (most recent call last):
File "./ssh_test.py", line 18, in <module>
client.
File "/usr/local/
self.
File "/usr/local/
raise saved_exception
ssh.PasswordReq
ssh-agent is running in my session, I can SSH to that box, no problems, it doesn't prompt me for a password or anything.
I'm guessing paramiko isn't able to connect to the running ssh-agent for some weird reason.
Has anyone else had a problem like this? I'm using Ubuntu 11.10
I seem to remember trying Fabric a while back and having similar problems, perhaps it's been broken for a while?