2015-03-25 228 views
0

是否可以在WinSCP腳本中自動使用Windows密碼?而不是在腳本文件中輸入。在WinSCP腳本中使用Windows密碼

script.txt文件包括:

open MyUserName:[email protected] 
option transfer binary 
get TestFile.txt c:\ 
close 

winscp.bat觸發腳本包含

winscp.exe /console /script=script.txt 
+0

是在同一個域中本地計算機的SFTP服務器?或者密碼恰好相同? – 2015-03-25 11:27:48

+0

是SFTP服務器用戶密碼與域密碼一起復制。所以SFTP服務器和本地機器的密碼是一樣的。 – geminatores 2015-03-25 11:31:43

回答

0

的WinSCP(或任何其他應用程序)不能檢索的Windows密碼。一般來說這是不可能的,這將是一個安全威脅。

無論如何,WinSCP支持Kerberos/GSSAPI/SSPI身份驗證,允許您重複使用您的域身份驗證連接到SSH/SFTP服務器。所以如果你的SSH/SFTP服務器支持,你可以使用它。

open sftp://[email protected] /rawsettings AuthGSSAPI=1 

參考文獻:

+0

謝謝你我以爲是。 – geminatores 2015-03-25 11:51:49