User (Old forums)MemberAugust 31, 2006 at 2:43 pmPost count: 23064
I’m attempting to transfer a file via SFTP, but I consistantly reach an error: “The command socket was disconnected from the FTP server.” at my EndConnect line. Below is some of my source. Has anyone happened upon a solution for this?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Xceed.Ftp.Licenser.LicenseKey = System.Configuration.ConfigurationManager.AppSettings(“componentLicense”)
Dim iphost As IPHostEntry = Dns.Resolve(“ServerName”)
Dim sftpServerAddress = iphost.HostName.ToString
Dim sftpServerPort = “22”
Dim sftpUsername = “Domain/User”
Dim sftpPassword = “Password”
‘ Create an instance of an FTP Client
Dim FtpClient1 As Xceed.Ftp.AsyncFtpClient = New Xceed.Ftp.AsyncFtpClient()
AddHandler FtpClient1.CertificateReceived, AddressOf Certificate_received
‘ Connect and Login to the FTP Client
Dim result As IAsyncResult = FtpClient1.BeginConnect(sftpServerAddress, sftpServerPort, AuthenticationMethod.Tls, VerificationFlags.None, Nothing, Nothing, Nothing)
RemoveHandler FtpClient1.CertificateReceived, AddressOf certificate_received
Public Sub certificate_received(ByVal sender As Object, ByVal e As CertificateReceivedEventArgs)
e.Action = VerificationAction.Accept
Imported from legacy forums. Posted by Jaye (had 6080 views)User (Old forums)MemberSeptember 1, 2006 at 3:29 pmPost count: 23064
Normally the port must be set to 990 when making a secure connection
Imported from legacy forums. Posted by André (had 489 views)User (Old forums)MemberSeptember 1, 2006 at 3:42 pmPost count: 23064
Caught that a few hours ago, but thank you kindly. 🙂
For anyone else that runs accross this issue, 990 is the standard implicit ssl port on most sftp servers and 22 the standard sftp port.
<i><color=”red”>* Could be different depending on your configuration.</color></i>
When using Xceed FTP for sftp via SSL/TLS (SSH is not supported), use that implicit ssl port for your port number in your BeginConnect.
Imported from legacy forums. Posted by Jaye (had 7943 views)
- You must be logged in to reply to this topic.