Subject: Authentication was partially successful, but server requires additional authentication with: 'public
Date: 2010-06-29 20:28:54
From: Mike Lawton
Source: authentication-partially-successful-server-requires-additional-authentication-public
----------------------------------------------------------------------

$0I'm getting an error trying to authenticate to a SFTP server:$0
$0$0
$0
$0{ComponentPro.Net.SftpException: Authentication was partially successful, but server requires additional authentication with: 'publickey'. ---> ComponentPro.Net.SshException: Authentication was partially successful, but server requires additional authentication with: 'publickey'." & vbCrLf & "   at ?.?(String A_0, String A_1, ? A_2, ? A_3)" & vbCrLf & "   at ?.?(String A_0, String A_1, ? A_2)" & vbCrLf & "   at ComponentPro.Net.Sftp.?(String A_0, String A_1, String A_2, Stream A_3, String A_4)" & vbCrLf & "   --- End of inner exception stack trace ---" & vbCrLf & "   at ComponentPro.Net.Sftp.?(String A_0, String A_1, String A_2, Stream A_3, String A_4)" & vbCrLf & "   at ComponentPro.Net.Sftp.Authenticate(String userName, String password, String privateKey, String privateKeyPasspharse)" & vbCrLf & "   at SFTPUpload.Upload.ConnectToSFTP(TransferArgs args)}$0
$0$0 $0 $0My code looks like this:$0 $0$0 $0 $0 $0 Try
            client = New Sftp()
            AddHandler client.HostKeyVerifyingAddressOf client_HostKeyVerifying
            client.Connect(SFTPAddress)
            If String.IsNullOrEmpty(PrivateKeyPathThen
                client.Authenticate(SFTPUserSFTPPassword)
            Else
                client.Authenticate(SFTPUserSFTPPasswordPrivateKeyPathPrivateKeyPassPhrase)
            End If
        Catch ex As Exception
            Console.Writeline(String.Format("An error occured while connecting: '{0}'."ex))
        End Try

    End Sub

    Private Sub client_HostKeyVerifying(ByVal sender As ObjectByVal e As HostKeyVerifyingEventArgs)
        e.Accept = True
        Console.WriteLine("HostKey: " & e.HostKey.ToString())
    End Sub$0 $0
$0 $0What am I missing? I have the *.key file properly pathed. I have the passphrase correct as well. I have a cert... which I've tried to install into the trusted root. I'd like to be able to automatically accept the server fingerprint... thought I'd done it. Perhaps I'm way off base.$0 $0
$0 $0Thanks in advance!$0 $0-Mike$0 $0 ---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index