Solved

SFTP Windows Script

Posted on 2008-06-19
2
2,552 Views
Last Modified: 2010-05-18
Hello, Urgent
Can someone provide me with a SCP windows batch script which does the following.
(I assume WINSCP is the best to use)

1) Login to a Linux machine via WINSCP / SCP  using a private key
2) Copy a local file (say c:\files\file.txt)  to the remote Linux server (say  /opt/files/file.txt)
3) Exit

Extra: If possible one script without keys using SFTP would be nice!
====

I can generate and manage the keys on the linux side

Much thanks
0
Comment
Question by:pauldhadialla
2 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 21823331
Please see the link below to see hot to set trust:

http://www.experts-exchange.com/Software/Internet_Email/File_Sharing/SSH_Telnet/Q_23497444.html?cid=235

Please see on how to use winscp.com from command line:

http://winscp.net/eng/docs/scripts
0
 

Author Closing Comment

by:pauldhadialla
ID: 31468807
I was looking for a and actual script immediatly but had to create myself from links which I had.  Thanks for trying.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

11 Experts available now in Live!

Get 1:1 Help Now