TouchSocketPro.Ssh
4.3.4
Prefix Reserved
dotnet add package TouchSocketPro.Ssh --version 4.3.4
NuGet\Install-Package TouchSocketPro.Ssh -Version 4.3.4
<PackageReference Include="TouchSocketPro.Ssh" Version="4.3.4" />
<PackageVersion Include="TouchSocketPro.Ssh" Version="4.3.4" />
<PackageReference Include="TouchSocketPro.Ssh" />
paket add TouchSocketPro.Ssh --version 4.3.4
#r "nuget: TouchSocketPro.Ssh, 4.3.4"
#:package TouchSocketPro.Ssh@4.3.4
#addin nuget:?package=TouchSocketPro.Ssh&version=4.3.4
#tool nuget:?package=TouchSocketPro.Ssh&version=4.3.4
TouchSocketPro.Ssh
TouchSocketPro.Ssh is being rebuilt as a TCP-based SSH implementation instead of a wrapper over an existing SSH library.
The first transport milestone removes the SSH.NET dependency, exposes only TouchSocket-owned API types, connects through TcpClientBase, sends the SSH client identification string, and parses the server identification string. Command channels and the SFTP file-management layer are the next protocol layers to wire onto this foundation.
var client = new SshClient();
await client.SetupAsync(new TouchSocketConfig()
.SetRemoteIPHost("127.0.0.1:22")
.SetSshClientOption(option =>
{
option.UserName = "root";
option.Password = "123456";
})
.ConfigurePlugins(pluginManager =>
{
pluginManager.UseReconnection<SshClient>(option =>
{
option.UseSimple(TimeSpan.FromSeconds(3));
option.UseSshCheckAction();
});
}));
await client.ConnectAsync();
Console.WriteLine(client.ServerIdentification);
await client.CloseAsync("ssh close");
服务端也可以直接分块挂插件:
config.ConfigurePlugins(pluginManager =>
{
pluginManager.UseSshExecCommand(ExecuteCommandAsync);
pluginManager.UseSshSftp("/var/ssh-root");
});
如果需要扩展SFTP文件行为,可以继承 SshServerSftpSubsystem 后通过工厂注册:
config.ConfigurePlugins(pluginManager =>
{
pluginManager.UseSshSftp(() => new MySftpSubsystem("/var/ssh-root"));
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.Bcl.Cryptography (>= 10.0.11)
- TouchSocket (>= 4.3.4)
- TouchSocketPro (>= 4.3.4)
-
.NETStandard 2.0
- Microsoft.Bcl.Cryptography (>= 10.0.11)
- TouchSocket (>= 4.3.4)
- TouchSocketPro (>= 4.3.4)
-
.NETStandard 2.1
- Microsoft.Bcl.Cryptography (>= 10.0.11)
- TouchSocket (>= 4.3.4)
- TouchSocketPro (>= 4.3.4)
-
net10.0
- Microsoft.Bcl.Cryptography (>= 10.0.11)
- TouchSocket (>= 4.3.4)
- TouchSocketPro (>= 4.3.4)
-
net6.0
- Microsoft.Bcl.Cryptography (>= 10.0.11)
- TouchSocket (>= 4.3.4)
- TouchSocketPro (>= 4.3.4)
-
net8.0
- Microsoft.Bcl.Cryptography (>= 10.0.11)
- TouchSocket (>= 4.3.4)
- TouchSocketPro (>= 4.3.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.