2

Is it possible to directly transfer files between two remote servers when they don't use the same protocol? I have a lot of files on serverA (which, at least for now, must be accessed using SFTP) and want to copy them to serverB (which must be accessed using FTP). Unfortunately, I can't do anything on the servers themselves as I am an external client for both.

3

If I understand what you're asking correctly, I think you can do it with

sudo apt-get install sshfs

followed by

mkdir serverAFiles
sshfs serverA:/path/to/the/directory serverAfiles

Now you will see the files on serverA in the 'serverAfiles' directory just as if they were on the local machine, and can ftp them onto serverB just as if they were local.

When you're done,

fusermount -u serverAfiles

will break the ssh connection and you'll no longer see the remote files as being local.

| improve this answer | |
  • Thanks. I'll give it a try when I get the chance. I hadn't even thought of mounting one of the servers. – Andrew Shum Nov 1 '17 at 16:54
  • It partly works. I can access the mounted system but only if I am doing it as root. Changing the permissions on the folder it is mounted to does nothing. Any ideas? – Andrew Shum Nov 1 '17 at 20:17
  • Never mind, I found the answer here. – Andrew Shum Nov 1 '17 at 20:54
  • Follow-up Question: According to the documentation, you are supposed to be able to use ssh options with sshfs. How do you do this? I have tried something like -o User=joe but then fuse gives me an error saying that User is not a recognized option. – Andrew Shum Nov 10 '17 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.