I'm trying to set a new password on a router using paramiko. In Ubuntu terminal it looks like that:
admin:~$ ssh admin@IP_address
IP_address's password: password
You logged in: router command line :
router_1>set_password
Changing admin's password
type old password :
type new password :
retype new password :
So when I'm trying to do the same with python as soon as it comes to set password
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(hostname='IPaddress', username='admin', password='password')
stdin, stdout, stderr = ssh.exec_command(command='set_password')
it pops out a window or a line asking to input old password Is it possible to input thous passwords automatically ?