I am trying to connect to SFTP via Paramiko with an SSH key protected by a passphrase. I uploaded the key to Pageant (which, as I understand it, is supported by Paramiko), but I can not get it to decrypt my private key.
I found this example here that references allow_agent=True , but this is not a parameter that can be used with SFTPClient .
Can anyone advise if it is possible to work with Paramiko and Pageant in this way?
This is my code at the moment that raises a PasswordRequiredException
privatekeyfile = 'path to key' mykey = paramiko.RSAKey.from_private_key_file(privatekeyfile) transport = paramiko.Transport(('host', 'port')) transport.connect('username',pkey = mykey) sftp = paramiko.SFTPClient.from_transport(transport)
source share