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_keys()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(router_ip,
username=router_username,
look_for_keys="private.ppk" ) #This is private file and its have in same folder
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("show ip route")
output = ssh_stdout.readlines()
ssh.close()