SFTP with sql server 2008

  • I want to know the syntax of SFTP command that will execute by sql server job and what steps will I have to follow to do public key authentication ? I am using SFTP to transfer files from window server 2008 to another window server 2008.

  • There may be a way but I am not aware of one. I have done an FTP job inside of an SSIS package, SFTP was not an option with SSIS. I guess you could download WinSCP and write a batch script file to do the SFTP with keys. Then you could setup a SQL Job to call out xp_cmdshell to execute that WinSCP batch file. This is just the first thing that came to my mind. Hope this helps.

    nitin.varshneya (2/13/2013)


    I want to know the syntax of SFTP command that will execute by sql server job and what steps will I have to follow to do public key authentication ? I am using SFTP to transfer files from window server 2008 to another window server 2008.

  • Thanks for your information.

    I am not able to find syntax to use SFTP with public key authentication .Can anybody help me ?

  • This might help: psftp has a public key option.

    http://the.earth.li/~sgtatham/putty/0.52/htmldoc/Chapter6.html

  • Hi Nitin,

    I am also looking for the same solution- using SFTP move the files between windows Servers and implementing by TSQL in SQL job. Cna you please share your solution if you have it working. Thanks.

  • Not in T-SQL I am afraid but we have recently utilised WINSCP via the command line to SFTP to a client site inside an SSIS package and that was pretty straightforward. T-SQL you would have to use xp_cmdshell, if its enabled.

    'Only he who wanders finds new paths'

  • i've used filezilla from a command line, as well as CoreFTP; both of which support SFTP and other protocols;

    i think FileZilla is free, and I know we paid for CoreFTP.

    https://wiki.filezilla-project.org/Command-line_arguments_(Client)?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply