Paramiko EOF在协商局域网中的一个特定桌面时

时间:2015-02-24 06:43:26

标签: python python-2.7 python-3.x cygwin paramiko

我的网络中有两个桌面,我安装了Cygwin并启动了sshd服务。使用paramiko我通过一台计算机通过sftp成功发送和接收文件。但是对于另一个我收到以下错误消息:

Traceback (most recent call last):
  File "C:\Neptune_Step_2015\Tests\SVTestcases\TC-Regression\netadmin.py", line 37, in <module>
    tc.receive_file_from_desktop()
  File "C:\Neptune_Step_2015\Tests\SVTestcases\Common/shared\testCaseBase.py", line 258, in receive_file_from_desktop
    sftp = ssh.open_sftp()
  File "C:\Python27\lib\site-packages\paramiko\client.py", line 379, in open_sftp
    return self._transport.open_sftp_client()
  File "C:\Python27\lib\site-packages\paramiko\transport.py", line 811, in open_sftp_client
    return SFTPClient.from_transport(self)
  File "C:\Python27\lib\site-packages\paramiko\sftp_client.py", line 132, in from_transport
    return cls(chan)
  File "C:\Python27\lib\site-packages\paramiko\sftp_client.py", line 101, in __init__
    raise SSHException('EOF during negotiation')
**paramiko.ssh_exception.SSHException: EOF during negotiation**

两台机器运行的代码绝对相同,如下所示:

  ssh = paramiko.SSHClient()
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

  try:

   ssh.connect(self.ftpipaddress,username = self.ftpuserName,password = self.ftppwd)
   #sftp = paramiko.SFTPClient.from_transport(trans) //Tried this too, did not work
   sftp = ssh.open_sftp()

我正在考虑可能性:

  1. Cygwin sshd在发生故障的计算机上运行不正常。但是,当我打开Cygwin时,我得到两台机器的相同输出:
  2.   

    $ cygrunsrv --verbose -Q sshd

    Service             : sshd
    Display name        : CYGWIN sshd
    Current State       : Running
    Controls Accepted   : Stop
    Command             : /usr/sbin/sshd -D
    stdin path          : /dev/null
    stdout path         : /var/log/sshd.log
    stderr path         : /var/log/sshd.log
    Environment         : CYGWIN="ntsec"
    Process Type        : Own Process
    Startup             : Automatic
    Dependencies        : tcpip
    Account             : .\cyg_server
    
    1. 我正在检查故障机器中的Windows防火墙。但无法找到端口22的任何阻塞过程。我也设置了一条新规则,但也没有帮助。我是否需要在Windows防火墙中进一步检查?

0 个答案:

没有答案