Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2865
  • Last Modified:

Windows FTP over SSL using WinScp

I'm running Windows 2008 FTP Server and have configured the ftp server to allow SSL connections. I have created my self-sign certificate and done all of the configs on the server side.

I want to be able to in to the ftp server securely and upload a file. I need help with a winscp script file that connects to my server using encrypted authentication along with encrypted data transfer.
0
abgtemp
Asked:
abgtemp
  • 4
  • 4
  • 2
  • +2
1 Solution
 
jpgobertCommented:
I'm not clear on what exactly you need help with..?  You say you've already done the server side configuration so that FTPs is working, right?

What part of the WinSCP script do you need help with?  What exactly do you want the script to do?

Need more details to be able to help...
0
 
bevhostCommented:
There is a command line utility that works like WinSCP,

You can download from this page
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

or using this link
http://the.earth.li/~sgtatham/putty/latest/x86/pscp.exe

for docs and howto info
http://the.earth.li/~sgtatham/putty/0.62/htmldoc/Chapter5.html#pscp
0
 
Dave BaldwinFixer of ProblemsCommented:
WinSCP and related programs use SSH, not SSL.  SSH is a different and incompatible encryption method.  To use WinSCP, you need an SSH server installed on your machine.  The Filezilla client and server support FTPS (FTP over SSL): https://filezilla-project.org/
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
jpgobertCommented:
Sorry DavidBaldwin but that's not true... WinSCP has support for FTP over SSL... it's just not in the GUI.  I just used the WinSCP command line version and opened a connection to my FTPS server and it worked fine.
0
 
AlexPaceCommented:
I believe basic FTPS support was added to WinSCP in version 4.2.  I don't know if it is scriptable like the SFTP engine.

You said that you need "encrypted authentication along with encrypted data transfer."

In terms of FTPS, this means you want both the control channel and the data channel to be protected.  Different FTPS clients have different default behaviors in this regard... some default to only protecting the control channel because that runs faster.  You'll have to check the WinSCP docs to be sure.

I use RoboFTP for scripting FTPS transfers and it has the /trust option you can add to your script so that it won't choke the first time it sees your self-signed certificate... so look for an option like that in winscp if you are going to distribute the script and don't want to support users that complain about having to acknowledge and accept the cert...  in RoboFTP the connection command syntax would be something like:

FTPLOGON "svr.mydomain.tld" /user="UserID" /pw="secret" /servertype=FTPS /trust=all
0
 
abgtempAuthor Commented:
I want to run it from the command line using the following command and script file for it to process.


 winscp.exe /console /script=c:\ftpcmds


**********************
FTPCMDS
**********************

option confirm off
open ftp://ftpuser@myserver.com:21 -certificate="xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" 
option transfer binary
put d:\file.txt
close
exit

Open in new window





What I'm not clear on is the following questions when connecting

1. Should I be using ftps:// or ftp://
2. Which other flags should I be using to ensure my credentials are encrypted and the data I am sending?  (-explicitssl -explicittls)?
0
 
abgtempAuthor Commented:
I was able to figure out the commands I needed. My final command was:

C:\winscp.com /console /script=c:\ftpcmds


**********************
FTPCMDS File Contents
**********************
option batch abort
option confirm off
open ftp://ftpuser:password@myserver.com -explicitssl -explicittls -certificate="xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" 
option transfer binary
put d:\file.txt
close
exit

Open in new window



I set the FTP server on my Windows box to Require that the Control Path and Data Path be encrypted.
0
 
abgtempAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for abgtemp's comment #a39181292

for the following reason:

No one else answered my question
0
 
abgtempAuthor Commented:
One correction. I used ftps:// instead of ftp://

C:\winscp.com /console /script=c:\ftpcmds


**********************
FTPCMDS File Contents
**********************
option batch abort
option confirm off
open ftps://ftpuser:password@myserver.com -explicitssl -explicittls -certificate="xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" 
option transfer binary
put d:\file.txt
close
exit

Open in new window

0
 
bevhostCommented:
Well if you asked the question correctly maybe you would have got the answer you seeked
0
 
bevhostCommented:
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now