Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python SSH Paramiko EOFError_Python_Ssh_Paramiko_Eoferror - Fatal编程技术网

Python SSH Paramiko EOFError

Python SSH Paramiko EOFError,python,ssh,paramiko,eoferror,Python,Ssh,Paramiko,Eoferror,我只有这样的简单脚本,可以通过SSH在诺基亚路由器上连接并执行命令“show time”: 成功登录到节点。我看到自己在路由器上,但执行命令行不通。我得到这样的错误: Traceback (most recent call last): File "C:\Users\pkudalsk\Desktop\pyt.py", line 6, in <module> ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command('show

我只有这样的简单脚本,可以通过SSH在诺基亚路由器上连接并执行命令“show time”:

成功登录到节点。我看到自己在路由器上,但执行命令行不通。我得到这样的错误:

Traceback (most recent call last):   File "C:\Users\pkudalsk\Desktop\pyt.py", line 6, in <module>
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command('show time')   File "C:\Users\pkudalsk\Desktop\paramiko\client.py", line 479, in exec_command

    chan.exec_command(command)   File "C:\Users\pkudalsk\Desktop\paramiko\channel.py", line 63, in _check
    return func(self, *args, **kwds)   File "C:\Users\pkudalsk\Desktop\paramiko\channel.py", line 241, in exec_comman d
    self._wait_for_event()   File "C:\Users\pkudalsk\Desktop\paramiko\channel.py", line 1198, in
_wait_for_ event
    raise e EOFError
Traceback(最近一次调用last):文件“C:\Users\pkudalsk\Desktop\pyt.py”,第6行,在
ssh_stdin,ssh_stdout,ssh_stderr=ssh.exec_命令(“显示时间”)文件“C:\Users\pkudalsk\Desktop\paramiko\client.py”,第479行,在exec_命令中
chan.exec_命令(命令)文件“C:\Users\pkudalsk\Desktop\paramiko\channel.py”,第63行,在检查中
在exec_comman d中返回func(self,*args,**kwds)文件“C:\Users\pkudalsk\Desktop\paramiko\channel.py”,第241行
self.\u wait\u等待事件()文件“C:\Users\pkudalsk\Desktop\paramiko\channel.py”,第1198行,在
_等待事件
提高e-EOFError
有人知道是什么导致了这个问题吗?我尝试了python 3.6和2.7。同样的结果

谢谢

Traceback (most recent call last):   File "C:\Users\pkudalsk\Desktop\pyt.py", line 6, in <module>
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command('show time')   File "C:\Users\pkudalsk\Desktop\paramiko\client.py", line 479, in exec_command

    chan.exec_command(command)   File "C:\Users\pkudalsk\Desktop\paramiko\channel.py", line 63, in _check
    return func(self, *args, **kwds)   File "C:\Users\pkudalsk\Desktop\paramiko\channel.py", line 241, in exec_comman d
    self._wait_for_event()   File "C:\Users\pkudalsk\Desktop\paramiko\channel.py", line 1198, in
_wait_for_ event
    raise e EOFError