login about faq

We are using SQL SERVER 2008 job to call batch file which is doing (Tectia) SFTP (pull) for txt file. When we are running independent batch file it is working fine but when we tried to call the same batch file using SQL Server Job it is throwing error "Could not connect to SFTP Server"

We are using sftpg3.exe -B "C:Tempgetftp.bat" --password=Password@12 user@ It also gives below message "Supplying the password on the command line is VERY insecure. Ina multi-user environment, the password is trivial to recover from the process table. You should set up a more secure way to authenticate. "publickey" authentication, certificates,"hostbased" authentication and "gssapi" can all provide non-interactive authentication in a secure way...

We do not want to any third party software to do this job. Does SQL SERVER Supports SFTPG3.exe ? Any one has any clue how to resolve above error about it kindly help.

asked Dec 30 '11 at 14:12

Parekada's gravatar image


Thanks a lot James the information is really helpful to us.

Still stuck with one step. We are still not able to run the sftp.bat batch file in SQL Server Job it gives message "unable to connect to FTP server". but when we run batch file independently it is running and connecting to FTP server. do we have to do any setting at SQL SERVER so that we can connect to SSH tectia server and download the file.

(Jan 02 '12 at 19:50) Parekada Parekada's gravatar image


You could try and solve this in a different way. If you execute the batch script, instead of executing sftpg3.exe first. For example:

a)  Open Notepad on your client machine.  Populate the file as follows:
      sftpg3 -B sftpcommands.txt --password=Password@12

b)  Save the file as “sftp.bat”. With this file you can specify the options used for the connection

c)  We will now create the “sftpcommands.txt”. Open notepad and populate the file as follows:
     open user@
     put "filenamehere.exe"

d)  Now try and run the batch file - it will read everything from the .txt file.

If you want to get rid of the error regarding the password you should try and setup public key user authentication, as this does not require a password used on the command line.

Hope this helps.

Thanks, James

This answer is marked "community wiki".

answered Jan 02 '12 at 10:44

jamesw's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Dec 30 '11 at 14:12

Seen: 9,884 times

Last updated: Jan 02 '12 at 19:50

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.