Transfer files between two remote SSH servers












8















Is there an easy way to transfer files between two SSH/SFTP servers? The perfect solution would be FileZilla, but it only lets you create a connection between local and remote, but not between remote and remote.



Theoretically I could open two Nautilus windows and connect to some ssh://server1/path/to/folder and ssh://server2/path/to/folder and then just pull the files from one to the other side. My experience is that this is very unstable. Transmitting files in size sum of i.e. 10MB is no problem, but transferring i.e. 10GB often resulted in Nautilus hanging itself up and remaining there in need of ps -e | grep nautilus -> kill -9 <pid>. I also tested the same thing with Nemo and Caja. While Nemo tends to be more stable than the two others, it still is not perfect and also breaks from time to time. FileZilla is extremely stable, never really got it to break, but it is not very flexible due to the mentioned fact that it can only connect to a single SSH server.



Of course I could also mount a folder with sshfs, but this is kind of an inconvenient solution. Too much pre-work to do to get a simple transfer running.



Is there any app that can handle transfers between two SSH servers without breaking? Perfect would be something like FileZilla, that picks up the job again if the connection got interrupted.










share|improve this question




















  • 2





    I suspect there's a perfectly good reason why ssh server1 nohup scp somefile server2:somefile isn't an answer but the question doesn't exclude it.

    – Joshua
    8 hours ago













  • @Joshua - I suspect that the questioner hasn't considered it - you should submit that as an answer.

    – Stobor
    2 hours ago
















8















Is there an easy way to transfer files between two SSH/SFTP servers? The perfect solution would be FileZilla, but it only lets you create a connection between local and remote, but not between remote and remote.



Theoretically I could open two Nautilus windows and connect to some ssh://server1/path/to/folder and ssh://server2/path/to/folder and then just pull the files from one to the other side. My experience is that this is very unstable. Transmitting files in size sum of i.e. 10MB is no problem, but transferring i.e. 10GB often resulted in Nautilus hanging itself up and remaining there in need of ps -e | grep nautilus -> kill -9 <pid>. I also tested the same thing with Nemo and Caja. While Nemo tends to be more stable than the two others, it still is not perfect and also breaks from time to time. FileZilla is extremely stable, never really got it to break, but it is not very flexible due to the mentioned fact that it can only connect to a single SSH server.



Of course I could also mount a folder with sshfs, but this is kind of an inconvenient solution. Too much pre-work to do to get a simple transfer running.



Is there any app that can handle transfers between two SSH servers without breaking? Perfect would be something like FileZilla, that picks up the job again if the connection got interrupted.










share|improve this question




















  • 2





    I suspect there's a perfectly good reason why ssh server1 nohup scp somefile server2:somefile isn't an answer but the question doesn't exclude it.

    – Joshua
    8 hours ago













  • @Joshua - I suspect that the questioner hasn't considered it - you should submit that as an answer.

    – Stobor
    2 hours ago














8












8








8


2






Is there an easy way to transfer files between two SSH/SFTP servers? The perfect solution would be FileZilla, but it only lets you create a connection between local and remote, but not between remote and remote.



Theoretically I could open two Nautilus windows and connect to some ssh://server1/path/to/folder and ssh://server2/path/to/folder and then just pull the files from one to the other side. My experience is that this is very unstable. Transmitting files in size sum of i.e. 10MB is no problem, but transferring i.e. 10GB often resulted in Nautilus hanging itself up and remaining there in need of ps -e | grep nautilus -> kill -9 <pid>. I also tested the same thing with Nemo and Caja. While Nemo tends to be more stable than the two others, it still is not perfect and also breaks from time to time. FileZilla is extremely stable, never really got it to break, but it is not very flexible due to the mentioned fact that it can only connect to a single SSH server.



Of course I could also mount a folder with sshfs, but this is kind of an inconvenient solution. Too much pre-work to do to get a simple transfer running.



Is there any app that can handle transfers between two SSH servers without breaking? Perfect would be something like FileZilla, that picks up the job again if the connection got interrupted.










share|improve this question
















Is there an easy way to transfer files between two SSH/SFTP servers? The perfect solution would be FileZilla, but it only lets you create a connection between local and remote, but not between remote and remote.



Theoretically I could open two Nautilus windows and connect to some ssh://server1/path/to/folder and ssh://server2/path/to/folder and then just pull the files from one to the other side. My experience is that this is very unstable. Transmitting files in size sum of i.e. 10MB is no problem, but transferring i.e. 10GB often resulted in Nautilus hanging itself up and remaining there in need of ps -e | grep nautilus -> kill -9 <pid>. I also tested the same thing with Nemo and Caja. While Nemo tends to be more stable than the two others, it still is not perfect and also breaks from time to time. FileZilla is extremely stable, never really got it to break, but it is not very flexible due to the mentioned fact that it can only connect to a single SSH server.



Of course I could also mount a folder with sshfs, but this is kind of an inconvenient solution. Too much pre-work to do to get a simple transfer running.



Is there any app that can handle transfers between two SSH servers without breaking? Perfect would be something like FileZilla, that picks up the job again if the connection got interrupted.







ssh nautilus transfer nemo caja






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 23 mins ago









Solomon Ucko

1034




1034










asked 10 hours ago









SocratesSocrates

7081127




7081127








  • 2





    I suspect there's a perfectly good reason why ssh server1 nohup scp somefile server2:somefile isn't an answer but the question doesn't exclude it.

    – Joshua
    8 hours ago













  • @Joshua - I suspect that the questioner hasn't considered it - you should submit that as an answer.

    – Stobor
    2 hours ago














  • 2





    I suspect there's a perfectly good reason why ssh server1 nohup scp somefile server2:somefile isn't an answer but the question doesn't exclude it.

    – Joshua
    8 hours ago













  • @Joshua - I suspect that the questioner hasn't considered it - you should submit that as an answer.

    – Stobor
    2 hours ago








2




2





I suspect there's a perfectly good reason why ssh server1 nohup scp somefile server2:somefile isn't an answer but the question doesn't exclude it.

– Joshua
8 hours ago







I suspect there's a perfectly good reason why ssh server1 nohup scp somefile server2:somefile isn't an answer but the question doesn't exclude it.

– Joshua
8 hours ago















@Joshua - I suspect that the questioner hasn't considered it - you should submit that as an answer.

– Stobor
2 hours ago





@Joshua - I suspect that the questioner hasn't considered it - you should submit that as an answer.

– Stobor
2 hours ago










4 Answers
4






active

oldest

votes


















15














If you are on an Ubuntu version that is still supported, then
your scp command will provide the -3 switch which enables
copying files from remote1 to remote2 via localhost:



me@local:~> scp -3 user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


You can also omit the -3 switch, but then you will need the
public key (id_rsa.pub) of user1@remote1 in the
file authorized_keys of user2@remote2:



me@local:~> scp user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


scp then under the hood does a ssh user1@remote1 first and from there
scp /path/to/file1 user2@remote2:/path/to/file2. That's why the credential must be
distributed different from the -3 solution.






share|improve this answer


























  • That's just beautiful. ssh is the Swiss army knife of software. Thanks, I learned something.

    – Organic Marble
    8 hours ago













  • Note that this approach, like the nautilus approach described in the question, will transfer the file first to the local machine, then up to the second server. This will cause significant slowdown when the two remote servers have a faster link between them than the local machine does to either. (For example, when the remote servers are in datacentres and the local machine has a DSL connection.)

    – Stobor
    2 hours ago



















0














Perhaps you could use one of several GUI front-ends to rsync:



Is there any GUI application for command rsync?



Or perhaps you could use rsync directly from the command line to connect to both remote servers:



"How to rsync files between two remotes"



I often log in to one server with ssh, then from that server's command line use rsync to push or pull files to the other remote server -- that's generally much quicker than trying to transfer the files through some 3rd computer.



The rsync is smart enough to do some work, then if anything goes wrong and interrupts the process, it can later resume right where it left off.






share|improve this answer































    0














    There's probably something I'm missing, but can't you SSH into one and connect to the other from it? Or do you want to avoid transferring one's credentials to the other? Or can they not access each other?






    share|improve this answer








    New contributor




    Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




























      -1














      You need to use SCP protocol.
      scp file you want to transfer login@address_of_second_server:/path_where_you_want_to_save






      share|improve this answer








      New contributor




      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





















      • OP wants to copy files between two remote computers, not from local computer to remote computer. He also seems to be looking for a GUI solution.

        – user68186
        10 hours ago











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1116153%2ftransfer-files-between-two-remote-ssh-servers%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      15














      If you are on an Ubuntu version that is still supported, then
      your scp command will provide the -3 switch which enables
      copying files from remote1 to remote2 via localhost:



      me@local:~> scp -3 user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


      You can also omit the -3 switch, but then you will need the
      public key (id_rsa.pub) of user1@remote1 in the
      file authorized_keys of user2@remote2:



      me@local:~> scp user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


      scp then under the hood does a ssh user1@remote1 first and from there
      scp /path/to/file1 user2@remote2:/path/to/file2. That's why the credential must be
      distributed different from the -3 solution.






      share|improve this answer


























      • That's just beautiful. ssh is the Swiss army knife of software. Thanks, I learned something.

        – Organic Marble
        8 hours ago













      • Note that this approach, like the nautilus approach described in the question, will transfer the file first to the local machine, then up to the second server. This will cause significant slowdown when the two remote servers have a faster link between them than the local machine does to either. (For example, when the remote servers are in datacentres and the local machine has a DSL connection.)

        – Stobor
        2 hours ago
















      15














      If you are on an Ubuntu version that is still supported, then
      your scp command will provide the -3 switch which enables
      copying files from remote1 to remote2 via localhost:



      me@local:~> scp -3 user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


      You can also omit the -3 switch, but then you will need the
      public key (id_rsa.pub) of user1@remote1 in the
      file authorized_keys of user2@remote2:



      me@local:~> scp user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


      scp then under the hood does a ssh user1@remote1 first and from there
      scp /path/to/file1 user2@remote2:/path/to/file2. That's why the credential must be
      distributed different from the -3 solution.






      share|improve this answer


























      • That's just beautiful. ssh is the Swiss army knife of software. Thanks, I learned something.

        – Organic Marble
        8 hours ago













      • Note that this approach, like the nautilus approach described in the question, will transfer the file first to the local machine, then up to the second server. This will cause significant slowdown when the two remote servers have a faster link between them than the local machine does to either. (For example, when the remote servers are in datacentres and the local machine has a DSL connection.)

        – Stobor
        2 hours ago














      15












      15








      15







      If you are on an Ubuntu version that is still supported, then
      your scp command will provide the -3 switch which enables
      copying files from remote1 to remote2 via localhost:



      me@local:~> scp -3 user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


      You can also omit the -3 switch, but then you will need the
      public key (id_rsa.pub) of user1@remote1 in the
      file authorized_keys of user2@remote2:



      me@local:~> scp user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


      scp then under the hood does a ssh user1@remote1 first and from there
      scp /path/to/file1 user2@remote2:/path/to/file2. That's why the credential must be
      distributed different from the -3 solution.






      share|improve this answer















      If you are on an Ubuntu version that is still supported, then
      your scp command will provide the -3 switch which enables
      copying files from remote1 to remote2 via localhost:



      me@local:~> scp -3 user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


      You can also omit the -3 switch, but then you will need the
      public key (id_rsa.pub) of user1@remote1 in the
      file authorized_keys of user2@remote2:



      me@local:~> scp user1@remote1:/path/to/file1 user2@remote2:/path/to/file2


      scp then under the hood does a ssh user1@remote1 first and from there
      scp /path/to/file1 user2@remote2:/path/to/file2. That's why the credential must be
      distributed different from the -3 solution.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited 9 hours ago

























      answered 9 hours ago









      PerlDuckPerlDuck

      6,37711335




      6,37711335













      • That's just beautiful. ssh is the Swiss army knife of software. Thanks, I learned something.

        – Organic Marble
        8 hours ago













      • Note that this approach, like the nautilus approach described in the question, will transfer the file first to the local machine, then up to the second server. This will cause significant slowdown when the two remote servers have a faster link between them than the local machine does to either. (For example, when the remote servers are in datacentres and the local machine has a DSL connection.)

        – Stobor
        2 hours ago



















      • That's just beautiful. ssh is the Swiss army knife of software. Thanks, I learned something.

        – Organic Marble
        8 hours ago













      • Note that this approach, like the nautilus approach described in the question, will transfer the file first to the local machine, then up to the second server. This will cause significant slowdown when the two remote servers have a faster link between them than the local machine does to either. (For example, when the remote servers are in datacentres and the local machine has a DSL connection.)

        – Stobor
        2 hours ago

















      That's just beautiful. ssh is the Swiss army knife of software. Thanks, I learned something.

      – Organic Marble
      8 hours ago







      That's just beautiful. ssh is the Swiss army knife of software. Thanks, I learned something.

      – Organic Marble
      8 hours ago















      Note that this approach, like the nautilus approach described in the question, will transfer the file first to the local machine, then up to the second server. This will cause significant slowdown when the two remote servers have a faster link between them than the local machine does to either. (For example, when the remote servers are in datacentres and the local machine has a DSL connection.)

      – Stobor
      2 hours ago





      Note that this approach, like the nautilus approach described in the question, will transfer the file first to the local machine, then up to the second server. This will cause significant slowdown when the two remote servers have a faster link between them than the local machine does to either. (For example, when the remote servers are in datacentres and the local machine has a DSL connection.)

      – Stobor
      2 hours ago













      0














      Perhaps you could use one of several GUI front-ends to rsync:



      Is there any GUI application for command rsync?



      Or perhaps you could use rsync directly from the command line to connect to both remote servers:



      "How to rsync files between two remotes"



      I often log in to one server with ssh, then from that server's command line use rsync to push or pull files to the other remote server -- that's generally much quicker than trying to transfer the files through some 3rd computer.



      The rsync is smart enough to do some work, then if anything goes wrong and interrupts the process, it can later resume right where it left off.






      share|improve this answer




























        0














        Perhaps you could use one of several GUI front-ends to rsync:



        Is there any GUI application for command rsync?



        Or perhaps you could use rsync directly from the command line to connect to both remote servers:



        "How to rsync files between two remotes"



        I often log in to one server with ssh, then from that server's command line use rsync to push or pull files to the other remote server -- that's generally much quicker than trying to transfer the files through some 3rd computer.



        The rsync is smart enough to do some work, then if anything goes wrong and interrupts the process, it can later resume right where it left off.






        share|improve this answer


























          0












          0








          0







          Perhaps you could use one of several GUI front-ends to rsync:



          Is there any GUI application for command rsync?



          Or perhaps you could use rsync directly from the command line to connect to both remote servers:



          "How to rsync files between two remotes"



          I often log in to one server with ssh, then from that server's command line use rsync to push or pull files to the other remote server -- that's generally much quicker than trying to transfer the files through some 3rd computer.



          The rsync is smart enough to do some work, then if anything goes wrong and interrupts the process, it can later resume right where it left off.






          share|improve this answer













          Perhaps you could use one of several GUI front-ends to rsync:



          Is there any GUI application for command rsync?



          Or perhaps you could use rsync directly from the command line to connect to both remote servers:



          "How to rsync files between two remotes"



          I often log in to one server with ssh, then from that server's command line use rsync to push or pull files to the other remote server -- that's generally much quicker than trying to transfer the files through some 3rd computer.



          The rsync is smart enough to do some work, then if anything goes wrong and interrupts the process, it can later resume right where it left off.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 7 hours ago









          David CaryDavid Cary

          4453617




          4453617























              0














              There's probably something I'm missing, but can't you SSH into one and connect to the other from it? Or do you want to avoid transferring one's credentials to the other? Or can they not access each other?






              share|improve this answer








              New contributor




              Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                0














                There's probably something I'm missing, but can't you SSH into one and connect to the other from it? Or do you want to avoid transferring one's credentials to the other? Or can they not access each other?






                share|improve this answer








                New contributor




                Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  0












                  0








                  0







                  There's probably something I'm missing, but can't you SSH into one and connect to the other from it? Or do you want to avoid transferring one's credentials to the other? Or can they not access each other?






                  share|improve this answer








                  New contributor




                  Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  There's probably something I'm missing, but can't you SSH into one and connect to the other from it? Or do you want to avoid transferring one's credentials to the other? Or can they not access each other?







                  share|improve this answer








                  New contributor




                  Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 2 hours ago









                  Solomon UckoSolomon Ucko

                  1034




                  1034




                  New contributor




                  Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Solomon Ucko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.























                      -1














                      You need to use SCP protocol.
                      scp file you want to transfer login@address_of_second_server:/path_where_you_want_to_save






                      share|improve this answer








                      New contributor




                      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





















                      • OP wants to copy files between two remote computers, not from local computer to remote computer. He also seems to be looking for a GUI solution.

                        – user68186
                        10 hours ago
















                      -1














                      You need to use SCP protocol.
                      scp file you want to transfer login@address_of_second_server:/path_where_you_want_to_save






                      share|improve this answer








                      New contributor




                      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





















                      • OP wants to copy files between two remote computers, not from local computer to remote computer. He also seems to be looking for a GUI solution.

                        – user68186
                        10 hours ago














                      -1












                      -1








                      -1







                      You need to use SCP protocol.
                      scp file you want to transfer login@address_of_second_server:/path_where_you_want_to_save






                      share|improve this answer








                      New contributor




                      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.










                      You need to use SCP protocol.
                      scp file you want to transfer login@address_of_second_server:/path_where_you_want_to_save







                      share|improve this answer








                      New contributor




                      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      share|improve this answer



                      share|improve this answer






                      New contributor




                      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      answered 10 hours ago









                      GravemindGravemind

                      657




                      657




                      New contributor




                      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





                      New contributor





                      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      Gravemind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.













                      • OP wants to copy files between two remote computers, not from local computer to remote computer. He also seems to be looking for a GUI solution.

                        – user68186
                        10 hours ago



















                      • OP wants to copy files between two remote computers, not from local computer to remote computer. He also seems to be looking for a GUI solution.

                        – user68186
                        10 hours ago

















                      OP wants to copy files between two remote computers, not from local computer to remote computer. He also seems to be looking for a GUI solution.

                      – user68186
                      10 hours ago





                      OP wants to copy files between two remote computers, not from local computer to remote computer. He also seems to be looking for a GUI solution.

                      – user68186
                      10 hours ago


















                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1116153%2ftransfer-files-between-two-remote-ssh-servers%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      CARDNET

                      Boot-repair Failure: Unable to locate package grub-common:i386

                      濃尾地震