Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 628
  • Last Modified:

Using PSFTP.exe from Cygwin

Greetings,
I would like to use a .sh in Cygwin to call the putty.exe distribution of psftp.exe application.  I need to use the command line option and would like guidance on the how to create a bash with the below args:
psftp.exe [user@host -batch] -pw [pass] -b [text file]
0
gNome
Asked:
gNome
1 Solution
 
klodefactorCommented:
First, two points:
- Because you're using Cygwin, it would be best to use sftp from the openssh package.
- If at all possible, don't put passwords in scripts.  It's better to configure non-interactive ssh authentication, for example by adding the client system's public ID to the authorized_keys file on the server.  A pretty good intro is at http://kimmo.suominen.com/docs/ssh/
Assuing you're using sftp and non-interactive authentication:
#!/bin/bash
sftp user@host:[path] -b [text file]

Open in new window

--klodefactor
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now