Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to connect to a SFTP server for a client of ours and send files in an automated process using MS Windows. The details I have received from the client do not include the password. I instead have the public-private key pair using PuTTY.

The typical connection string used is as follows

open sftp://username:password.SFTPURL:port -hostkey="ssh-dss 1024 XXXXXXX"

I do not however understand how to specify the private key in this connection, instead of the password. How do I tell the script where the private key lies and is there a particular key word to use when connecting using public key?

I am new at this so please bear with me.


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.