import jnpr
import jnpr.junos.exception
from lxml import etree
from simple_colors import *
hostname = input("Device hostname: ")
junos_username = input("Junos OS username: ")
device = jnpr.junos.Device(hostname,junos_username,ssh_config_file="~./ssh/config",auth_type="twofactor")
device.open()
output_ntp = device.rpc.get_ntp_associations_information()
print (etree.tostring(output_ntp,encoding='unicode'))
#print ("Hostname", (blue (device.facts['hostname'])))
#print ("Model:" ,(blue (device.facts['model'])))
#print ("Junos Version:", (blue (device.facts['version'])))
device.close()
I get prompt with a "verification code:" which makes me believe the authentication is working but after that it crashes with error: "Negotiation failed: Error reading SSH protocol banner" it has a problem reading the ssh banner it seems. Anyone experienced something similar with ssh banners and PyEZ?