Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using PSFTP.exe from Cygwin

Posted on 2011-02-22
1
Medium Priority
?
620 Views
Last Modified: 2013-11-15
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
Comment
Question by:gNome
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
klodefactor earned 1500 total points
ID: 36490265
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Invest in your employees with these five simple steps to improve employee engagement and retention.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

671 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question