[Solved] C# Validate sftp connection or check the access, list directories, upload files to the sftp server using Renci.SshNet and ftp server by using sftpClient.


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.

Renci.SshNet package installation

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.


We can Renci.SshNet package using NuGet package manager to validate the FTP credentials and the server.

Shivaraju M

Over 3+ years experience in IT industry, good knowledge in . Net-based Web applications, windows applications, web services, and SPAs. I have played multiple roles related to technical delivery in multiple domains while working on over 10+ technologies. I am currently focused on continuous improvement and agile project management.

Post a Comment

Previous Post Next Post