Difference between revisions of "Sftpman"

From ArchWiki
Jump to: navigation, search
(Created page with "Category:Networking (English) {{i18n|sftpman}} You can use sftpman (an sshfs helper) to mount a remote system - accessible via SSH - to a local folder. sftpman offer...")
 
m (fixed old AUR links)
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Networking (English)]]
+
[[Category:Secure Shell]]
{{i18n|sftpman}}
+
 
You can use sftpman (an [[sshfs]] helper) to mount a remote system - accessible via [[SSH]] - to a local folder.
 
You can use sftpman (an [[sshfs]] helper) to mount a remote system - accessible via [[SSH]] - to a local folder.
  
Line 10: Line 9:
 
In order to use ''sftpman'' or it's GTK frontend ''sftpman-gtk'', you'll first need to have a working [[sshfs]] setup.
 
In order to use ''sftpman'' or it's GTK frontend ''sftpman-gtk'', you'll first need to have a working [[sshfs]] setup.
  
[[sshfs]] and [[fuse]] are installed as dependencies, so you may just need to add ''fuse'' to your module-list in {{Filename|/etc/[[rc.conf]]}} to auto-load at boot.
+
[[sshfs]] and fuse are installed as dependencies, so you may just need to add ''fuse'' to your module-list in {{ic|/etc/[[rc.conf]]}} to auto-load at boot.
  
 
== Installation ==
 
== Installation ==
The [http://aur.archlinux.org/packages.php?ID=49211 sfptman] and [http://aur.archlinux.org/packages.php?ID=49959 sftpman-gtk] packages are available in the [[AUR]].
+
The {{AUR|sftpman}} and {{AUR|sftpman-gtk}} packages are available in the [[AUR]].
  
 
''sftpman'' provides the base library and the command-line application ''sftpman''.
 
''sftpman'' provides the base library and the command-line application ''sftpman''.
Line 24: Line 23:
 
A system with an id of ''my-machine'' will be mounted locally to ''/mnt/sshfs/my-machine''.
 
A system with an id of ''my-machine'' will be mounted locally to ''/mnt/sshfs/my-machine''.
  
Authentication with the remote filesystem during mounting will be performed using SSH keys, so you'll need to have that setup. Password-based authentication is not supported. For more information on SSH keys see: [http://linuxmafia.com/~karsten/Linux/FAQs/sshrsakey.html How to Use RSA Key Authentication with SSH]
+
Authentication with the remote filesystem during mounting can be performed using passwords or [[SSH Keys]].
  
To define a new remote filesystem using the command-line tool, do:
+
To define a new remote filesystem with password-based authentication using the command-line tool, do:
 
  # sftpman setup --id "my-machine" --host "HOSTNAME_OR_IP" --user "USERNAME" \
 
  # sftpman setup --id "my-machine" --host "HOSTNAME_OR_IP" --user "USERNAME" \
  --mount_point "/REMOTE_PATH" --ssh_key "PATH_TO_PRIVATE_KEY"
+
  --mount_point "/REMOTE_PATH" --auth_method=password
 +
 
 +
Or the equivalent in case you want to use authentication with SSH Keys (recommended):
 +
# sftpman setup --id "my-machine" --host "HOSTNAME_OR_IP" --user "USERNAME" \
 +
--mount_point "/REMOTE_PATH" --auth_method=publickey --ssh_key "PATH_TO_PRIVATE_KEY"
  
 
The above setup is the minimum you need to specify to define a new filesystem that sftpman can mount.
 
The above setup is the minimum you need to specify to define a new filesystem that sftpman can mount.
Line 45: Line 48:
 
To unmount:
 
To unmount:
 
  # sftpman unmount my-machine
 
  # sftpman unmount my-machine
 +
 +
{{Note| In order for the GUI application to be able to ask you for a password when mounting, you'll need to install some form of an ssh askpass tool. See: [[SSH_Keys#Using_ssh-agent_and_x11-ssh-askpass]] }}
  
 
=== Removing defined filesystems ===
 
=== Removing defined filesystems ===
Line 60: Line 65:
 
  # sftpman preflight_check
 
  # sftpman preflight_check
  
If mounting a filesystem fails, sftpman will give you the full ''sshfs'' command and its output.
+
If the GUI application does not ask you for a password while mounting (when using password-based authentication or for password-protected ssh keys), you will need to install an ssh askpass tool, see [[Sftpman#Mounting/Unmounting]].
You can then use that command and run it manually (possibly after adding some more debug options to it, so you would see some more output).
+
 
 +
{{Note| If mounting a filesystem fails, sftpman will give you the full ''sshfs'' command and its output.
 +
You can then use that command and run it manually (possibly after adding some more debug options to it, so you would see some more output). }}
 +
 
 +
When doing authentication using keys, start small and make sure SSHing actually works by trying it manually, before trying to use sshfs. Some common problems can be solved by consulting [[Using_SSH_Keys#Troubleshooting]].
 +
 
 +
Also see [[Sshfs#Troubleshooting]].
  
 
==Other Resources==
 
==Other Resources==
Line 68: Line 79:
 
[https://github.com/spantaleev/sftpman-gtk sftpman-gtk] - sftpman-gtk (source code, issue tracker) at github
 
[https://github.com/spantaleev/sftpman-gtk sftpman-gtk] - sftpman-gtk (source code, issue tracker) at github
  
[https://github.com/spantaleev/sftpman-aur sftpman-aur] - AUR packages (source code, issue tracker) for ''sftpman'' and ''sftpman-gtk'' at github
+
[https://github.com/spantaleev/PKGBUILDs PKGBUILDs] - Package files (source code, issue tracker) for ''sftpman'' and ''sftpman-gtk'' at github
  
 
==See also==
 
==See also==
 
* [[SSH]]
 
* [[SSH]]
 
* [[sshfs]]
 
* [[sshfs]]

Revision as of 23:57, 7 August 2013

You can use sftpman (an sshfs helper) to mount a remote system - accessible via SSH - to a local folder.

sftpman offers both a command-line tool (sftpman) and a GTK frontend (sftpman-gtk, see screenshot), each packaged separately.

With sftpman, you first setup (define) your remote filesystems and then you mount/unmount them easily (with one click/command).

Prerequisite

In order to use sftpman or it's GTK frontend sftpman-gtk, you'll first need to have a working sshfs setup.

sshfs and fuse are installed as dependencies, so you may just need to add fuse to your module-list in /etc/rc.conf to auto-load at boot.

Installation

The sftpmanAUR and sftpman-gtkAUR packages are available in the AUR.

sftpman provides the base library and the command-line application sftpman.

sftpman-gtk provides the sftpman-gtk application, a GTK frontend to sftpman.

Defining filesystems

Each filesystem managed by sftpman needs to have a unique name/id which will be used when managing the system and also in its mount path. A system with an id of my-machine will be mounted locally to /mnt/sshfs/my-machine.

Authentication with the remote filesystem during mounting can be performed using passwords or SSH Keys.

To define a new remote filesystem with password-based authentication using the command-line tool, do:

# sftpman setup --id "my-machine" --host "HOSTNAME_OR_IP" --user "USERNAME" \
--mount_point "/REMOTE_PATH" --auth_method=password

Or the equivalent in case you want to use authentication with SSH Keys (recommended):

# sftpman setup --id "my-machine" --host "HOSTNAME_OR_IP" --user "USERNAME" \
--mount_point "/REMOTE_PATH" --auth_method=publickey --ssh_key "PATH_TO_PRIVATE_KEY"

The above setup is the minimum you need to specify to define a new filesystem that sftpman can mount. Depending on your environment, you may need to use some more options (like --port, which defaults to 22). To see a full list of available options do:

# sftpman help

You can also use the GTK frontend to define new filesystems more easily.

Mounting/Unmounting

Once you've defined several filesystems, you can mount them by using their ids.

To mount:

# sftpman mount my-machine

which mounts the filesystem to /mnt/sshfs/my-machine

To unmount:

# sftpman unmount my-machine
Note: In order for the GUI application to be able to ask you for a password when mounting, you'll need to install some form of an ssh askpass tool. See: SSH_Keys#Using_ssh-agent_and_x11-ssh-askpass

Removing defined filesystems

To remove a defined filesystem from sftpman's list do:

# sftpman rm machine-id

Learning more

To see a list of more commands and options that sftpman supports, consult the help:

# sftpman help

Troubleshooting

sftpman can perform some basic checks on the environment, which may catch some potential problems:

# sftpman preflight_check

If the GUI application does not ask you for a password while mounting (when using password-based authentication or for password-protected ssh keys), you will need to install an ssh askpass tool, see Sftpman#Mounting/Unmounting.

Note: If mounting a filesystem fails, sftpman will give you the full sshfs command and its output. You can then use that command and run it manually (possibly after adding some more debug options to it, so you would see some more output).

When doing authentication using keys, start small and make sure SSHing actually works by trying it manually, before trying to use sshfs. Some common problems can be solved by consulting Using_SSH_Keys#Troubleshooting.

Also see Sshfs#Troubleshooting.

Other Resources

sftpman - sftpman (source code, issue tracker) at github

sftpman-gtk - sftpman-gtk (source code, issue tracker) at github

PKGBUILDs - Package files (source code, issue tracker) for sftpman and sftpman-gtk at github

See also