PuTTY PSFTP command line works as Admin, fails as User

半城伤御伤魂 提交于 2019-12-08 09:49:28

You load PuTTY stored site myserver.domain.us.com.

That is stored in Windows registry of the local account.

If you run the script using a different account, it won't see the site definition.

You have to define the session completely on command line. What you probably even attempted.

  • Remove the -load;
  • Add -ssh to make it clear you want to use SSH (but it's default anyway)
  • Add -hostkey=... with a fingerprint of the SSH host key (you need the latest version of PuTTY for the -hostkey switch, but you need to upgrade anyway, the version 0.60 is not secure).
D:\psftp.exe -ssh myserver.domain.us.com -hostkey=... -l User1 -b MyCommand Script
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!