我使用$ftp = Net::SFTP::Foreign->new(%args);
從HP-UX中獲取Linux機器。它工作沒有問題。Net :: SFTP :: Foreign不適用於從HP-UX連接到Windows主機
當我嘗試連接到安裝在Windows SFTP服務器,這是行不通的 $ FTP->錯誤包含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=>
這似乎是相關的:'read_passphrase:無法打開/ dev/tty:沒有這樣的設備或地址' – choroba
當我連接到Linux主機時,它怎麼沒有引起問題? – Alex
你如何連接到Linux主機?你使用密碼,密碼,密碼,無密碼密鑰,......?你能通過其他工具連接到Windows服務器嗎? – choroba