Solution
There is a simple way to validate the sftp server in c#, follow the below instructions to validate the SFTP server using c#.
Install the packages
Use NuGet package manager to install the SSH.NET api to our application as shown in the below image.
Procedure to validate the sftp connection.
To check sftp connections we can use test https://test.rebex.net/ ftp and sftp URL. And, use the below code snippet for the reference to validate the sftp connection.
Summary
We can Renci.SshNet package using NuGet package manager to validate the FTP credentials and the server.
Tags
C#