puttypsftp

PuTTY PSFTP command line works as Admin, fails as User


I have an interesting dilemma with PuTTY PSFTP.

Set up...

Pageant .60
putty .60

Used command:

D:\psftp.exe -load myserver.domain.us.com -l User1 -b MyCommand Script

This loads PuTTY PSFTP, logs in using the user ID with the help of Pageant and then sends a file using commands in the script.

This works great while logged in as an Admin on the server. It fails while logged in as a regular user on the server:

"psftp: no hostname specified;"blah blah blah.

Including -v reveals no further messages.

What possible delta could there be with permissions or other settings between a server Admin and regular user when it comes to PuTTY?


Solution

  • 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.

    D:\psftp.exe -ssh myserver.domain.us.com -hostkey=... -l User1 -b MyCommand Script