Hello,
I am trying to use python script to connect to netscreen firewall using paramiko and grap some commands output. It works fine with Juniper SRX, however it is not working on netscreen. If any solution or alternative script can be used please let me know
import paramiko
List = ['10.1.1.1']
for router in List:
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAd
client.load_system_host_keys()
client.connect(router, username='netscreen',password='netscreen')
print '\n' + '\n' + "[-] SSH connection established successfully to %s" % router + '\n'
stdin, stdout, stderr = client.exec_command("get config")
data = stdout.read()
print data
client.close()
-------------------------------
OUTPUT
[-] SSH connection established successfully to 10.1.1.1
Traceback (most recent call last):
File "E:\ssh.py", line 12, in <module>
stdin, stdout, stderr = client.exec_command("get config")
File "C:\Python27\lib\site-packages\paramiko\client.py"
mand
chan.exec_command(command)
File "C:\Python27\lib\site-packages\paramiko\channel.py
return func(self, *args, **kwds)
File "C:\Python27\lib\site-packages\paramiko\channel.py
mmand
self._wait_for_event()
File "C:\Python27\lib\site-packages\paramiko\channel.py
for_event
raise e
paramiko.ssh_exception.SSHException: Channel closed.