3

I have been using Paramiko to send commands across on a Linux/Windows machine.

It is working fine for remotely executing tests on an Ubuntu machine. However, it doesn't work on the Windows 7 host machine.

Below is the error that I received:-

def _unit_for_event(self):
  self_event.wait()
  assert self.event.isSet()

  if self.event_ready:
    return
  e = self.transport.get_exception()
  if e is None:
    e = SSHException ('Channel closed.')
  raise e

The exception was:

E SSHException: Channel closed.

I am using the latest Paramiko version 1.7.7.1 and installing Open SSHd on the Windows 7 machine.

Has anyone had a similar experience to the above? This error is not seen when I remotely execute on a Linux machine.

4

1 回答 1

3

在我的情况下,这原来是由于服务器上的 SFTP 配置错误。尝试一下sftp user@remote-host,如果这不起作用,您就会知道这是根本原因。解决问题取决于您的服务器是什么。

于 2012-06-11T20:01:33.020 回答