Solved

SFTP Windows Script

Posted on 2008-06-19
2
2,559 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Batch/VBScript : Disable Windows tasks 7 34
Ubuntu Apache Webserver - File Permissions 5 42
error log using ftp 7 41
Bash script - Exit out of choice loop 2 31
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

803 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