Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the public key with me(the pub file), for using sftp with public key authentication mode. How do i use sftp command for testing transfer file from my machine to the sftp server. For username and password authentication, I can transfer the files. However not sure on the commands and configuration we should use for sftp in public key authentication mode. The public key is a .pub extension file, starting with 'ssh-dss'. I have winscp and putty.

Also how do I check for the logs/reasons in case if the file transfer is a failure. I undertstand that the settings at the server side should also be proper.

share|improve this question

1 Answer 1

You cannot connect with public key only, you need to have a private key too.

You need to generate private/public key pair (e.g. using PuTTYgen) and register the public key on the server. Then you use the private key with your client (be it WinSCP, PuTTY or any other SSH client).

See WinSCP guide for public key authentication.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.