Hi! Can anyone help me to fix the below error? Thanks!
Error: File "", line 12, in <module>
ssh_client(IP,port=22, username='admin', password='cisco')
TypeError: 'SSHClient' object is not callable
import paramiko with open('network/routers') as f: for IP in f: ssh_client=paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh_client(IP,port=22, username='admin', password='cisco') stdin, stdout, stderr = ssh_client.exec_command('show version') output=stdout.read().decode() print(output) with open(IP + '_output.txt', 'w') as f: f.write(output) ssh_client.close()