[paramiko] [PATCH] SSHClient, win_pageant and missing MFC71.DLL: Disallowing the use of ssh-agent
Dwayne Litzenberger
dwayne at oscl.ca
Wed Dec 19 07:41:21 PST 2007
On machines that don't have MFC71.DLL installed, I get a modal dialog box when
public key authentication fails:
---------------------------
python.exe - Unable To Locate Component
---------------------------
This application has failed to start because MFC71.DLL was not found.
Re-installing the application may fix this problem.
---------------------------
OK
---------------------------
This dialog box blocks the process until somebody presses OK, which is bad for
a background service.
I've traced the problem to the following lines:
client.py:398:for key in Agent().get_keys():
agent.py:68:import win_pageant
win_pageant.py:35:import win32ui
Agent.__init__ imports win_pageant, which attempts to import win32ui.
Importing the win32ui module is what causes the dialog box to pop up.
In my application, I don't want paramiko to try to talk to the agent anyway,
since it needs to use an application-specific private key. I've attached a
patch that adds an "allow_agent" parameter to SSHClient.connect().
Regards,
- Dwayne
--
Dwayne Litzenberger, B.A.Sc.
Information Technology Analyst
Open Systems Canada Limited
#210 - 2332 11th Ave
Regina, SK S4P0K1
Office: (306) 359-OSCL (6725)
http://www.oscl.ca/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: paramiko-allow_agent.patch
Type: text/x-diff
Size: 2458 bytes
Desc: not available
Url : http://www.lag.net/pipermail/paramiko/attachments/20071219/c41b8816/attachment.patch
More information about the paramiko
mailing list