Python Forum
could not fully run paramiko
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
could not fully run paramiko
#1
Connection to the device is ok. But when im trying to send some commands, i get an error:

stdin, stdout, stderr = ssh.exec_command('show ip int brief')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/paramiko/client.py", line 405, in exec_command
    chan.exec_command(command)
  File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 60, in _check
    return func(self, *args, **kwds)
  File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 229, in exec_command
    self._wait_for_event()
  File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 1086, in _wait_for_event
    raise e
  File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 1726, in run
    ptype, m = self.packetizer.read_message()
  File "/usr/lib/python3/dist-packages/paramiko/packet.py", line 386, in read_message
    header = self.read_all(self.__block_size_in, check_rekey=True)
  File "/usr/lib/python3/dist-packages/paramiko/packet.py", line 251, in read_all
    raise EOFError()
EOFError
using Python3 with Paramiko
Any help?

Thanks
Reply
#2
Nice traceback, where's the code?
also, for traceback use error tags. not python tags
Reply
#3
thank you for a reply.

Im quite new to python so in step by step manner i do this:

osboxes@osboxes:~$ python3

Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.


>>> import paramiko
>>> ssh = paramiko.SSHClient()
>>> ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
>>> ssh.connect('10.35.1.1',username='admin',password='password')
>>> stdin,stdout,stderr=\
Output:
... ssh.exec_command("show version")
Error:
Traceback (most recent call last):  File "<stdin>", line 2, in <module>  File "/usr/lib/python3/dist-packages/paramiko/client.py", line 405, in exec_command    chan.exec_command(command)  File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 60, in _check    return func(self, *args, **kwds)  File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 229, in exec_command    self._wait_for_event()  File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 1086, in _wait_for_event    raise e  File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 1726, in run    ptype, m = self.packetizer.read_message()  File "/usr/lib/python3/dist-packages/paramiko/packet.py", line 386, in read_message    header = self.read_all(self.__block_size_in, check_rekey=True)  File "/usr/lib/python3/dist-packages/paramiko/packet.py", line 251, in read_all    raise EOFError() EOFError >>>
As you see after sending "show version" line im getting an error.

Could you explain to me, what you mean in:

"for traceback use error tags. not python tags"  or where to read about it ?
Reply
#4
ok, so here a little bit formated text. Is it right ? Thanks:)

osboxes@osboxes:~$ python3

Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import paramiko
>>> ssh = paramiko.SSHClient()
>>> ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
>>> ssh.connect('10.35.1.1',username='admin',password='password')
>>> stdin,stdout,stderr=ssh.exec_command("show version")

Error:
Traceback (most recent call last): File "<stdin>", line 2, in <module> File "/usr/lib/python3/dist-packages/paramiko/client.py", line 405, in exec_command   chan.exec_command(command) File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 60, in _check   return func(self, *args, **kwds) File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 229, in exec_command   self._wait_for_event() File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 1086, in _wait_for_event   raise e File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 1726, in run   ptype, m = self.packetizer.read_message() File "/usr/lib/python3/dist-packages/paramiko/packet.py", line 386, in read_message   header = self.read_all(self.__block_size_in, check_rekey=True) File "/usr/lib/python3/dist-packages/paramiko/packet.py", line 251, in read_all   raise EOFError() EOFError
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to fully uninstall Python from Windows? Winfried 6 10,556 May-27-2020, 10:16 PM
Last Post: snippsat
  Could I override a fully implemented method zatlas1 2 2,409 Jun-06-2019, 02:20 AM
Last Post: zatlas1

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020