|
|
7 năm trước cách đây | |
|---|---|---|
| build | 8 năm trước cách đây | |
| src | 6 năm trước cách đây | |
| test | 9 năm trước cách đây | |
| .gitattributes | 9 năm trước cách đây | |
| .gitignore | 9 năm trước cách đây | |
| LICENSE | 9 năm trước cách đây | |
| README.md | 8 năm trước cách đây | |
| THIRD-PARTY-NOTICES.TXT | 6 năm trước cách đây | |
| appveyor.yml | 8 năm trước cách đây |
SSH.NET is a Secure Shell (SSH-2) library for .NET, optimized for parallelism.
This project was inspired by Sharp.SSH library which was ported from java and it seems like was not supported for quite some time. This library is a complete rewrite, without any third party dependencies, using parallelism to achieve the best performance possible.
SSH.NET supports the following key exchange methods:
SSH.NET supports the following MAC algorithms:
SSH.NET supports the following target frameworks:
Establish a SFTP connection using both password and public-key authentication:
var connectionInfo = new ConnectionInfo("sftp.foo.com",
"guest",
new PasswordAuthenticationMethod("guest", "pwd"),
new PrivateKeyAuthenticationMethod("rsa.key"));
using (var client = new SftpClient(connectionInfo))
{
client.Connect();
}
Establish a SSH connection using user name and password, and reject the connection if the fingerprint of the server does not match the expected fingerprint:
byte[] expectedFingerPrint = new byte[] {
0x66, 0x31, 0xaf, 0x00, 0x54, 0xb9, 0x87, 0x31,
0xff, 0x58, 0x1c, 0x31, 0xb1, 0xa2, 0x4c, 0x6b
};
using (var client = new SshClient("sftp.foo.com", "guest", "pwd"))
{
client.HostKeyReceived += (sender, e) =>
{
if (expectedFingerPrint.Length == e.FingerPrint.Length)
{
for (var i = 0; i < expectedFingerPrint.Length; i++)
{
if (expectedFingerPrint[i] != e.FingerPrint[i])
{
e.CanTrust = false;
break;
}
}
}
else
{
e.CanTrust = false;
}
};
client.Connect();
}
| Software | net35 | net40 | netstandard1.3 | sl4 | sl5 | wp71 | wp8 | uap10.0 |
|---|---|---|---|---|---|---|---|---|
| Windows Phone SDK 8.0 | x | x | x | x | ||||
| Visual Studio 2012 Update 5 | x | x | x | x | x | x | ||
| Visual Studio 2015 Update 3 | x | x | x | x | x | |||
| Visual Studio 2017 | x | x |