Solved

Using PSFTP.exe from Cygwin

Posted on 2011-02-22
1
586 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
A list of useful business intelligence software.
Viewers will learn how to use the Hootsuite Dashboard.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

820 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