If you need to do a lot of file operations against a remote ssh/sftp server then sshfs might be the perfect tool. sshfs is a FUSE filesystem that you can mount onto a local mount point. Once mounted you can manipulate the files as if there were local.
Here’s the project site:
http://fuse.sourceforge.net/sshfs.html
You might need to install with yum or apt-get:
1 |
yum install sshfs |
After sshfs installed you can use it like this:
1 2 |
mkdir mymount sshfs user@remoteip:/remote/path mymount/ |
You’ll be prompted for a password unless you has keys setup with the remote server.
Now you can copy files to and from under mymount/.