I am using Renci SSH.NET but am trying to test an FTP server (not an SFTP site).
I got this working with WinSCP - but I can't get it to work on Renci - WinSCP allows me to install the protocol on FTP or SFTP - I think this is a problem - I’m invited
No suitable authentication method found for full authentication (publicickkey, keyboard-interactive).
How to disable SFTP (and just use FTP) on Renci SSH.NET? I tried
Dim c As Renci.SshNet.SftpClient / ScpClient/ BaseClient / NetConfClient
here is the code:
Private Sub LancerUpload()
Dim PWAuthMeth = New PasswordAuthenticationMethod(Login, Password)
Dim KIAuthMeth = New KeyboardInteractiveAuthenticationMethod(Login)
AddHandler KIAuthMeth.AuthenticationPrompt, AddressOf HandleKeyEvent
Dim ConnectionInfo As New ConnectionInfo(ServerName, 22, Login, PWAuthMeth, KIAuthMeth)
Dim SshClient1 As New SshClient(ConnectionInfo)
Try
SshClient1.Connect()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
MsgBox(SshClient1.IsConnected)
End Sub
Private Sub HandleKeyEvent(sender As Object, e As Renci.SshNet.Common.AuthenticationPromptEventArgs)
For Each prompt As Renci.SshNet.Common.AuthenticationPrompt In e.Prompts
If prompt.Request.IndexOf("Password:", StringComparison.InvariantCultureIgnoreCase) <> -1 Then
prompt.Response = Password
End If
Next
End Sub
source
share