I have a problem with paramiko ssh on python. Whatever I do I receive only [] from any device I try to connect to (ubiquity, cisco, etc...) I've scouted the internet and I don't see what I'm doing wrong, could anyone help me ?
import paramiko
def SSH_CONN(IP,USERNAME,PASSWORD,COMMANDS):
device = paramiko.SSHClient()
device.load_system_host_keys()
device.set_missing_host_key_policy(paramiko.AutoAddPolicy())
device.connect(IP, username=USERNAME, password=PASSWORD, port=22)
stdin, stdout, stderr = device.exec_command(COMMANDS)
device_return = stdout.readlines()
print(device_return)
device.close()
SSH_CONN("IP", "username", "password", "command")