Authentication 在WinSCP脚本中使用Windows密码

Authentication 在WinSCP脚本中使用Windows密码,authentication,sftp,windows-authentication,winscp,Authentication,Sftp,Windows Authentication,Winscp,是否可以在WinSCP脚本中自动使用Windows密码?而不是在脚本文件中键入它 script.txt文件包括: open MyUserName:MyPassword@MySFTPserver.net option transfer binary get TestFile.txt c:\ close 触发脚本的winscp.bat包含 winscp.exe /console /script=script.txt WinSCP或任何其他应用程序都无法从Windows检索密码。一般来说这是不可

是否可以在WinSCP脚本中自动使用Windows密码?而不是在脚本文件中键入它

script.txt文件包括:

open MyUserName:MyPassword@MySFTPserver.net
option transfer binary
get TestFile.txt c:\
close 
触发脚本的winscp.bat包含

winscp.exe /console /script=script.txt

WinSCP或任何其他应用程序都无法从Windows检索密码。一般来说这是不可能的,这将是一种安全威胁

无论如何,WinSCP支持Kerberos/GSSAPI/SSPI身份验证,允许您重用域身份验证以连接到SSH/SFTP服务器。因此,如果您的SSH/SFTP服务器支持,您可以使用它

open sftp://MyUserName@MySFTPserver.net /rawsettings AuthGSSAPI=1
参考资料:


您的SFTP服务器是否与本地计算机位于同一域中?或者密码恰好相同?是的,SFTP服务器用户密码与域密码复制。因此,SFTP服务器和本地计算机的密码是相同的。