Using fabric to copy file from one remote server to another remote server?

Brian O'Dell

I need to make a service that can copy a file from one remote server to another remote server. I could just run this in a subshell:

scp user@host1:/path/to/file/video.mp4 user@host2:/path/to/file

But that doesn't seem nearly as good as using something like fabric's put command, which only copies a local file to a remote machine. I also need this to run entirely with ssh keys, no password prompting.

James Socol

You can use get to get the file from host1 and then put to push it to host2.

For keys, if the private key isn't in the default location, you can specify it with the -i flag, e.g.:

fab -i /path/to/priv/key

or put it in the fabfile:

from fabric import env
env.key_filename = '/path/to/priv/key'

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to copy files and folders from one remote server to another remote server using scp command?

From Dev

How to copy things from one remote directory to another in the same server using WinSCP .NET assembly in C#

From Dev

In an SFTP session is it possible to copy one remote file to another location on same remote SFTP server?

From Dev

scp from one remote server to another remote server

From Dev

scp from one remote server to another remote server

From Dev

How to move a file from one folder to another folder on a remote server using SharpSsh and C#

From Dev

SCP from remote server to another remote server

From Dev

SCP from remote server to another remote server

From Dev

Copy InMemory file to remote server

From Dev

Transfer a file from remote server to remote server

From Dev

Transfer a file from remote server to remote server

From Dev

Reading file from remote server using groovy

From Dev

copy file from one server to another in linux

From Dev

How to copy file from SSH remote host to Jenkins Server

From Dev

How to copy file from Windows laptop to Linux remote server

From Dev

How to copy a file from a remote server to a local machine?

From Dev

Unable to copy a file from remote server to local machine

From Dev

How to copy file contents from remote server to local machine location?

From Dev

Transferring 70TB data from one remote server to another

From Dev

Using rsync to copy from local to remote server with cronjob, asking for password

From Dev

copy files from one remote machine to another

From Dev

Cannot SSH/SFTP to remote server without using another remote server

From Dev

Move files from Remote Server to another Remote Server

From Dev

scp to local from a remote server that ssh's to another remote server

From Dev

How to copy table from one table on remote server to table on a different remote db mysql5.6 with PDO

From Dev

Copy a file to remote server(very Complicated)

From Dev

copy local file to remote server in ubuntu terminal

From Dev

FileZilla: Transfer file remote server to remote server from a local computer

From Dev

Download a file from a remote server using ASP MVC

Related Related

  1. 1

    How to copy files and folders from one remote server to another remote server using scp command?

  2. 2

    How to copy things from one remote directory to another in the same server using WinSCP .NET assembly in C#

  3. 3

    In an SFTP session is it possible to copy one remote file to another location on same remote SFTP server?

  4. 4

    scp from one remote server to another remote server

  5. 5

    scp from one remote server to another remote server

  6. 6

    How to move a file from one folder to another folder on a remote server using SharpSsh and C#

  7. 7

    SCP from remote server to another remote server

  8. 8

    SCP from remote server to another remote server

  9. 9

    Copy InMemory file to remote server

  10. 10

    Transfer a file from remote server to remote server

  11. 11

    Transfer a file from remote server to remote server

  12. 12

    Reading file from remote server using groovy

  13. 13

    copy file from one server to another in linux

  14. 14

    How to copy file from SSH remote host to Jenkins Server

  15. 15

    How to copy file from Windows laptop to Linux remote server

  16. 16

    How to copy a file from a remote server to a local machine?

  17. 17

    Unable to copy a file from remote server to local machine

  18. 18

    How to copy file contents from remote server to local machine location?

  19. 19

    Transferring 70TB data from one remote server to another

  20. 20

    Using rsync to copy from local to remote server with cronjob, asking for password

  21. 21

    copy files from one remote machine to another

  22. 22

    Cannot SSH/SFTP to remote server without using another remote server

  23. 23

    Move files from Remote Server to another Remote Server

  24. 24

    scp to local from a remote server that ssh's to another remote server

  25. 25

    How to copy table from one table on remote server to table on a different remote db mysql5.6 with PDO

  26. 26

    Copy a file to remote server(very Complicated)

  27. 27

    copy local file to remote server in ubuntu terminal

  28. 28

    FileZilla: Transfer file remote server to remote server from a local computer

  29. 29

    Download a file from a remote server using ASP MVC

HotTag

Archive