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.

https://www.example-code.com/vbnet/sftp_pubkeyAuthentication.asp

How do I accomplish this task?

asked Sep 11 at 19:09

chilkat's gravatar image

chilkat ♦♦
12.8k317367481


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.)

link

answered Sep 11 at 19:09

chilkat's gravatar image

chilkat ♦♦
12.8k317367481

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×226
×32

Asked: Sep 11 at 19:09

Seen: 205 times

Last updated: Sep 11 at 19:09

powered by OSQA