PuTTY’s psftp hangs

puttysftp

I'm trying to use psftp for a nightly sftp upload but I found out that it hangs. Does anyone have any experience with what may cause such hangs? The psftp can stay in this state for days at end. I tried adding -bc and -be to the start up, it already had -batch.

Best Answer

I assume you are using scheduled tasks to run this nightly?

Open a command prompt (use runas /user:login@domain.com cmd if the task runs with credentials other than your own), then attempt to run the command that you have scheduled. If you are using the -batch parameter, remove it for troubleshooting purposes.

Does the command run properly?

I recently had a similar issue with pscp, it got stuck in a "Running" state because the account the scheduled task was configured to use had not connected to the specific server before and pscp generated the normal "The server's host key is not cached in the registry." prompt and was waiting for confirmation. Using the -batch parameter conceals this prompt. Once I had accepted the prompt once, it ran perfectly, even with -batch.