Can't login via SSH key using Python [duplicate]
问题 This question already has answers here : How to ssh connect through python Paramiko with ppk public key (4 answers) Closed 6 months ago . I am trying to login via ssh in my server using python. I have generated key using putty. when i using this key in putty, its working fine. but when i am trying to connect from python it's saying authentication failed import paramiko router_ip = "157.230.16.214" router_username = "root" ssh = paramiko.SSHClient() # Load SSH host keys. ssh.load_system_host