Closed
Description
I am using this package to connect to an SFTP server with SSH key. Looking at the package homepage it says under supported host key algorithms that it supports "ecdsa-sha2-nistp256"
However when I use the latest version of this package and connect to an SFTP server using a ecdsa-sha2-nistp256 OpenSSH private key, I get this message:
openssh key type: ecdsa-sha2-nistp256 is not supported
Have I missed something in my understanding here? Should this be supported as according to the package description or is it because of "openssh" type that it is not supported?
using (var stream = assembly.GetManifestResourceStream(resourceName))
{
if (stream == null)
{
throw new InvalidOperationException($"Resource '{resourceName}' not found.");
}
using (var keyFile = new PrivateKeyFile(stream, keyFilePassphrase))
{
var keyFiles = new[] { keyFile };
var methods = new List<AuthenticationMethod> { new PrivateKeyAuthenticationMethod(FTPUsername, keyFiles) };
var conInfo = new ConnectionInfo(FTPServer, FTPUsername, methods.ToArray());
using (var client = new SftpClient(conInfo))
{
client.Connect();
....
....
....
Metadata
Metadata
Assignees
Labels
No labels