'Paramiko authentication with certificate and oprivate key
I have a linux device which supports authentication with a certificate and a private key.
I have tried to connect with:
k = paramiko.RSAKey.from_private_key_fil("path to privte key")
client.connect(server,port,user, key_filename ="path to certificate file", pkey=k)
I cannot connect in any way to the device.
Under windows with OPEN SSH I can connect to the device with :
ssh [email protected] -p 22 -o IdentityFile=C:\client_key\client_key -o CertificateFile=C:\client_key\OTCsigned_certificate
Solution 1:[1]
I have solved the issue by : Renaming the key and the certificate as id_rsa and id_rsa-cert.pub.
At argument key_filename i passed the certificate and alongside with it the paramiko loads also the private key.
It is finally working.
Br,
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gradinariu Alexandru |
