Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssh connection in C# windows 10 app

Tags:

c#

ssh

windows-10

I have been looking far and wide for 2 days for something that can help me with this. I need a way to connect to an ssh server from a Windows 10 Universal app. This means that normal ssh libraries wont work, and tcpclient doesn't exist. How can I do this? Thanks in advance.

like image 288
Mrab Ezreb Avatar asked Oct 26 '25 10:10

Mrab Ezreb


1 Answers

According to this GitHub Issue, SSH.NET supports UAP 10/UWP as of SSH.NET 2016.0.0-beta1.

You can download it here: https://www.nuget.org/packages/SSH.NET

Then use it doing something like:

using (var client = new SshClient("hostnameOrIp", "username", "password"))
{
    client.Connect();
    client.RunCommand("...");
    client.Disconnect();
}
like image 197
Charles Clayton Avatar answered Oct 28 '25 23:10

Charles Clayton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!