Net::SFTP::Foreign 无法从 HP-UX 连接到 Windows 主机

Net::SFTP::Foreign doesn't work for connectiong to Windows host from HP-UX

我使用 $ftp = Net::SFTP::Foreign->new(%args); 到 sftp 到 Linux HP-UX 机器。它没有问题。

当我尝试连接到 Windows 上安装的 SFTP 服务器时,它不起作用 $ftp->error 包含 Connection to remote server is broken 错误和 login procedure timed out 当带有 more => '-v' 选项时。

当我 运行 它与 more => '-vvv' 我得到低于日志。谁能帮助我理解问题并帮助解决问题?

debug1: Host 'windowsHost' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:3
debug2: bits set: 4101/8192
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: input_userauth_banner
Welcome! Please login.
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug3: start over, passed a different list password,publickey,keyboard-interactive
debug3: preferred keyboard-interactive,password
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
password
Enter password for user
debug2: input_userauth_info_req: num_prompts 1
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: 
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug3: packet_send2: adding 64 (len 55 padlen 9 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (password,publickey,keyboard-interactive).

请注意,它适用于 linux 个主机

(根据评论的要求) 尝试通过 SSH 从 unix 连接到 SFTP 服务器。我不相信它应该有效而且它没有...

unixServerName ENV:/home/me/scripts/perl=>ssh user\@windowsHost
password
Enter password for user
Password:
shell request failed on channel 0
unixServerName ENV:/home/me/scripts/perl=>

现在从命令行使用 SFTP

unixServerName ENV:/home/me/scripts/perl=>sftp user\@windowsHost
password
Enter password for user
Password:
Connected to windowsHost.
sftp>
sftp> quit
unixServerName ENV:/home/me/scripts/perl=>

问题是由密码中的 ('#') 井号字符引起的。超级奇怪。我能够在来自 2 个不同供应商的服务器上重现该问题。所以可以肯定这是 Net::SFTP::Foreign

中的错误

请注意,这仅发生在 Windows 主机上,并且适用于 Unix HP 和 Linux 主机。

为了使我的论点更有说服力,从命令行 SSH 和 SFTP 一切正常。