I\'m trying to use Paramiko to connect to an SSH server from Python. This is what I tried so far:
>>> import paramiko
>>> import os
>>>
The RSAKey.from_private_key_file()
is inherited from PKey(); an optional parameter of this method is a password. To quote:
If the private key is encrypted and password is not None, the given password will be used to decrypt the key (otherwise PasswordRequiredException is thrown).
As you're not passing a password and your key is encrypted this exception will always be thrown. There's only one way round this problem, to actually give the method a password. You, therefore, need a way of getting the password out of the OSXKeychain.
You could use the cross-platform Keyring module to do this.