SFTP Drive - Linux Quickstart
SFTP Drive is an easy-to-use command line application that mounts remote file systems and allows you to browse and work with files as if they were stored on your local machine.
SFTP Drive requires only a few prerequisites to be installed in order to run properly:
- /n software SFTP Drive
- Microsoft .NET 6 (or later) Runtime
- FUSE 2 (FUSE 3 Support Coming Soon)
Installing the .NET runtime and FUSE libraries on Linux can typically be done in only a couple of commands. If the commands listed below are not suitable for your environment please refer to the official Microsoft and FUSE documentation for instructions on installing on your system. In most the following commands can be used:
sudo yum install dotnet-runtime-6.0 sudo yum install fuse-libs
sudo apt-get install dotnet-runtime-6.0 sudo apt-get install libfuse2
Mounting the Remote File System
Connecting to a server is designed to be simple. The connection details may be provided as command line arguments or via a configuration file. The following command is all that is necessary to mount a drive.
dotnet sftpdrive.dll start user@hostname /local/folder
Please note that the local folder must be empty. A remote folder can be specified by using the syntax user@hostname:/remote/folder.
Another way to start the drive is to specify the connection details using a configuration file. The installation includes an example sftpdrive_example.conf file that can be modified for your environment. The following command is all that is necessary to mount a drive via a configuration file.
dotnet sftpdrive.dll start -c example.confFor details on additional command-line options and examples please use the help command as in the example below or refer to the "Running SFTP Drive" section of the Online Documentation.
dotnet sftpdrive.dll help
Below is an example configuration file with the minimal settings needed to mount a drive. Details about possible settings and values can be found in the sftpdrive_example.conf file that is included with the product.
# The Global section is for system-wide mount point settings. [Global] # Logging settings. LogMode can be set to 0 (off) to 5 (debug): # 0 Off - Nothing will be logged. # 1 Error - Only errors will be logged. # 2 Warning - Additional warning information will be logged. # 3 Info - General information about the status of the connection will be logged. # 4 Verbose - Logs additional information about the connection and detailed protocol information. # 5 Debug - Logs detailed debug information, including raw data. LogFile="/path/to/file.log" LogMode=4 LogToFile=True [AppInfo] Name="SFTPDrive" [Drives\drive_name] # Certificate-based authentication is done by setting the CertStore* settings. # CertStore is the filepath of the client certificate. CertStore="/path/to/MyFile.key" CertStorePassword="password" # MountPoint is the desired location on the local disk where the server's filesystem should be mounted. MountPoint="/path/to/mount/point" # Server information Host="remote_ip" Port=22 Username="root" RemoteRoot="/" # The TrustedSSHHostKeys section will automatically add trusted host keys after a user prompt is accepted # during the initial login. Trusted host keys can also be added with the following format: # [remote ip]:[port]="[SHA-256 fingerprint of the server's public key]" [TrustedSSHHostKeys]Once the start command has run successfully, verbose level console output should look something like the following:
[04/06/2023 11:09:57] [TID=001] SFTP Drive 22.0.8490 [04/06/2023 11:09:57] [TID=001] Unix 184.108.40.206 [04/06/2023 11:09:57] [TID=001] Driver installed: 220.127.116.11 [04/06/2023 11:09:57] [TID=001] License: [Beta Edition] [04/06/2023 11:09:57] [TID=001] LogMode: Verbose [04/06/2023 11:09:57] [TID=001] Starting SFTP service. [04/06/2023 11:09:57] [TID=001] [VERB ] [Global] ... [04/06/2023 11:36:07] [TID=011] [VERB ] [drive_name] CBFS FUSE OnInit Result: 0 [04/06/2023 11:36:12] [TID=011] [INFO ] [drive_name] Successfully added mounting point '/path/to/mount/point'. [04/06/2023 11:36:12] [TID=001] [INFO ] [drive_name] Mounting complete. [04/06/2023 11:36:12] [TID=001] The SFTP service started successfully.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at firstname.lastname@example.org.