Any idea how I can use the paramiko.RSAKey.from_private_key() function?
paramiko.RSAKey.from_private_key()
I know there is a from_private_key_file(), but I\'m interested in us
from_private_key_file()
This should do it:
import io import paramiko private_key_file = io.StringIO() private_key_file.write('-----BEGIN RSA PRIVATE KEY-----\nlskjdflk\n...\n-----END RSA PRIVATE KEY-----\n') private_key_file.seek(0) private_key = paramiko.RSAKey.from_private_key(private_key_file)