我正在尝试将文件从 unix 盒子下载到内存缓冲区,然后将文件上传到另一个 unix 盒子,但是当我尝试下载文件时,它会询问我的密码然后即使我把它放进去也会失败。我都试过了:
data = Net::SCP.download!("remote.host.com", "username", "/remote/path", :password => password)
和
data = Net::SCP::download!("remote.host.com", "username", "/remote/path", :password => password)
但我得到:
Active Directory Password:
然后当我输入密码时:
Net::SCP::Error: SCP did not finish successfully (1)
ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32] net-scp (1.0.4)