sftp Clients
Install and configure several different sftp clients.
2022-08-06 Ubuntu 20.04, Raspbian bullseye, Linux Mint, Windows 11, macOS 12.5
sftp – Command Line Interface (CLI) client
is inbuilt into openssh, which presumably is already installed on any modern client.
Suppose domain user fred.nerk@geddy.au has been assigned
UNIX user fred.nerk
on sftp server ftp.geddy.au
.
Get a command prompt (how depends on operating system) then:
graham:~ sftp fred.nerk@ftp.geddy.au Password: fred.nerk's password sftp> helpsshfs – network mount client – all linux flavours
Suppose domain user fred.nerk@geddy.au has been assigned
UNIX user fred.nerk
on
sftp server ftp.geddy.au
.
Ubuntu, Mint installation
graham:~ sudo apt update graham:~ sudo apt install sshfsmacOS installation
Requires macports; we assume it is already installed.
graham:~ sudo port selfupdate graham:~ sudo port install sshfs- sshfs depends upon a non-Apple kext module, and macOS security requires some dramatic steps to grant it permission, as follows.
-
Try running
sshfs
as described below for normal usage. It will popup a refusal message. Note down the Third Party signer mentioned in the popup. -
Enable use of the foreign kext:
- Reboot in Recovery Mode (command-R on bootup);
- Select menubar item Security Options;
-
Select Reduced Security and tick option
Allow user management of kernel extensions from identified developers
; - Reboot normally.
-
Run
sshfs
again and this time, in the refusal popup, tick approval of the Third Party signer previously noted.
Using the client
We will mount on local directory ~/share.
graham:~ mkdir ~/share # create mount point graham:~ sshfs fred.nerk@ftp.geddy.au: ~/share # mount Password: fred.nerk's password graham:~ ls ~/share graham:~ vi ~/share/foo.txt graham:~ umount ~/share # unmount- Create a directory onto which to mount the remote sftp directory.
-
Mount using
sshfs
. Note that it is not done asroot
. Also note the trailing ':' on ftp account. - Contents of the remote sftp directory can be accessed per usual mounts. In this example we list directory contents and edit a file.
- Unmount it once finished.
SSHFS for Windows – network mount client – Windows 11
Suppose domain user fred.nerk@geddy.au has been assigned
UNIX user fred.nerk
on sftp server ftp.geddy.au
.
Windows 11 installation
-
Browse to
SSHFS for Windows
and scroll down to
Installation
. - Download and install WinFsp.
- Download and install SSHFS-Win.
Using the client
-
In Windows Explorer, select This PC > Map Network Drive and enter the desired drive letter
(e.g.F
) and SSHFS path (e.g.\\sshfs\fred.nerk@ftp.geddy.au
). -
The first time you map a particular SSHFS path you will be prompted for the SSHFS username and password. You may choose to save these credentials with the Windows Credential Manager in which case you will not be prompted again.
-
In order to unmap the drive, right-click on the drive icon in Windows Explorer and select Disconnect.
At this point, files in the sftp share can be accessed via the
F:
drive.