JustSFTP.Server
1.0.0
See the version list below for details.
dotnet add package JustSFTP.Server --version 1.0.0
NuGet\Install-Package JustSFTP.Server -Version 1.0.0
<PackageReference Include="JustSFTP.Server" Version="1.0.0" />
<PackageVersion Include="JustSFTP.Server" Version="1.0.0" />
<PackageReference Include="JustSFTP.Server" />
paket add JustSFTP.Server --version 1.0.0
#r "nuget: JustSFTP.Server, 1.0.0"
#:package JustSFTP.Server@1.0.0
#addin nuget:?package=JustSFTP.Server&version=1.0.0
#tool nuget:?package=JustSFTP.Server&version=1.0.0
Just SFTP Server
This library implements the V3 version of the SFTP protocol, and just it - you are free to use any transport/encryption layer (e.g. using a library like Microsoft's DevTunnels SSH), or OpenSSH's daemon - see JustSFTP.Host.
The SFTPServer class takes 2 Streams and optionally an ISFTPHandler on which the SFTP commands will be invoked. This package comes with a DefaultSFTPHandler which provides basic I/O on the hosts's filesystem (based on a rootdirectory), but it should be pretty easy to implement your own ISFTPHandler so you can, for example, implement a virtual filesystem.
Implementing an ISFTPHandler
Implementing an ISFTPHandler should be pretty straightforward, simply implement the ISFTPHandler interface.
Throw a HandlerException to reflect a status code back tothe client.
Exceptions that are not inherited from the HandlerException will be returned to the client as Failure (SSH_FX_FAILURE).
For an example implementation you can have a look at the DefaultSFTPHandler.
Known issues and limitations
Note that this library only implements V3; higher versions are not supported. Clients connecting with a higher version will be negotiated down to V3.
The
SymLinkcommand has been implemented with thelinkpathandtargetpathswapped; We may or may not interpret the RFC incorrectly (Update: We didn't) or the clients which were used to test theSymLinkcommand (WinSCP, Cyberduck and the 'native' sftp commandline executable) had the arguments swapped. TheSymLinkandReadLinkmethods are only available from .Net 6.0 upwards.The
DefaultSFTPHandlerDOES NOT take particular much care of path canonicalization or mitigations against path traversion. When used in an untrusted environment extra care should be taken to ensure safety.The
DefaultSFTPHandlerDOES NOT make a noteworthy effort to return correct POSIX file permissions, nor does it support setting permissions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- JustSFTP.Protocol (>= 1.0.0)
-
net8.0
- JustSFTP.Protocol (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.