Junos Automation (Scripting)
Junos Automation (Scripting)

problem with starting a shell - jnpr.junos.utils.start_shell

‎11-13-2018 09:48 PM

Hi,

 

I am trying to login to shell, save a long output in a file and compress it. Then transfer the compressed file. I am getting below error when I attempt to start shell. 

Goal is to save the output in a file and then transfer it after compressing.  This is to save data transfer time, output is long enough that regular RPC takes very long. If starting a shell doesn;t work, is there any other way to save output locally on router in a file from RPC? 

 

Also, I am using port: 22 for netconf. Any idea what can be wrong? 

 

Thank you, 

 

>>> ss = StartShell(dev)
>>> ss.open()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "....../python2.7/site-packages/jnpr/junos/utils/start_shell.py", line 93, in open
password=junos._auth_password,
File "....../python2.7/site-packages/paramiko/client.py", line 424, in connect
passphrase,
File "....../python2.7/site-packages/paramiko/client.py", line 714, in _auth
raise saved_exception
paramiko.ssh_exception.SSHException: No existing session