Sshfs
From ArchWiki
You can use sshfs to mount a remote system - accessible via ssh - to a local folder. So You will be able to do any operation on the mounted files with any tool (copy, rename, edit with vim, etc.).
To install the needed packages, do:
pacman -S sshfs
This should install fuse and sshfs, and maybe other packages.
You will use the command sshfs to mount, but first a kernel module should be loaded, so as root, do:
modprobe fuse
(You can put fuse into the module-list of /etc/rc.conf to auto-load at boot.)
To mount a remote directory:
sshfs USERNAME@HOSTNAME_OR_IP:/PATH LOCAL_MOUNT_POINT SSH_OPTIONS
for example:
sshfs sessy@mycomputer:/home/sessy /mnt/sessy -C -p 9876
Where 9876 is the port number.
Also, make certain that before connecting, you set the file permissions for any local client folders you will attempt to mount a remote directory to. I.e., don't have everything owned by root!
SSH will ask for the password, if needed.
If You don't want to type in your password 49 times a day, than read this: How to Use RSA Key Authentication with SSH
To unmount the remote system:
fusermount -u LOCAL_MOUNT_POINT fusermount -u /mnt/sessy
Tip: to quickly mount a remote dir, do some file-management and unmount it, put this in a script:
sshfs USERNAME@HOSTNAME_OR_IP:/PATH LOCAL_MOUNT_POINT SSH_OPTIONS mc ~ LOCAL_MOUNT_POINT fusermount -u LOCAL_MOUNT_POINT
This will mount the remote directory, launch MC, and unmount it when You exit.
[edit] Common issues
[edit] Connection reset by peer
- If you are trying to access the remote system with a hostname, try using its IP address, as it can be a domain name solving issue. Make sure you edit /etc/hosts with the server details.
- Forum thread: sshfs: Connection reset by peer