If you’re using a windows machine, download winscp.exe. It’s available here.
Winscp is the command-line equivalent of GUI programs like SSH Secure Shell. It allows you to automate the process of file transfer across an SSH connection, and can even accept a script name as its primary argument!
@echo off set scriptname=%1 winscp /console /script=c:path_to_scripts%scriptname%.txt
The following represents a simple script which would correspond to the path and file name called in the batch file above:
option batch off option confirm off # OPEN open user:password@xx.xx.xxx.xxx # PUT LOCATION cd war # FILE TO TRANSFER option transfer binary put c:path_to_filessome_file.txt # QUIT SESSION close # QUIT PROGRAM exit

