login about faq

I’m trying to code in VB.NET both a password & public key authentication for login into a SFTP server.

I tried following this example, but it did not work. My public key is encrypted from the customer.

It seems this example uses a private key, which I do not have, so I’m confused on how to do it.


How do I accomplish this task?

asked Sep 11 '17 at 19:09

chilkat's gravatar image

chilkat ♦♦

The term "public key authentication" means that you (the client side) uses the private key, which only you have and thus it's like a password, while the public key is installed on a server. This is how it works with SSH public key authentication. The owner of the key is free to hand out his public key to any number of servers, where it can be installed under his user account. Given that you're the only holder of the private key, only you can authenticate.

If you have an encrypted key, then it must be that you have the private key. There aren't really any formats that encrypt a public key because there's no need to encrypt a public key.

If you truly need password & public key authentication, then you would call AuthenticatePwPk, where you pass both a password and a private key. The AuthenticatePk method is where only a private key is needed for authentication. (Likewise, AuthenticatePw is where only a password is needed.)


answered Sep 11 '17 at 19:09

chilkat's gravatar image

chilkat ♦♦

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: Sep 11 '17 at 19:09

Seen: 1,794 times

Last updated: Sep 11 '17 at 19:09

powered by OSQA