Solved

Using PSFTP.exe from Cygwin

Posted on 2011-02-22
1
567 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
1 Comment
 
LVL 4

Accepted Solution

by:
klodefactor earned 500 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now