0

Often as a shorthand, to copy credentials from one machine to another, I will copy-paste the contents into a file on the remote server. Is there a way to do this with binary data? For example, I have a python .pickle file that I would like to copy to another location. Aside from using another utility such as scp or git, is it possible to copy/paste the data to the remote file?

Note: this is not about hot to copy a file locally. I am asking how do I copy-paste the contents of a binary file on my local machine to a remote machine.

David542
  • 104,438
  • 178
  • 489
  • 842
  • Does this answer your question? [How to move a file in Python](https://stackoverflow.com/questions/8858008/how-to-move-a-file-in-python). Alternatively, [How do I copy a file in python](https://stackoverflow.com/questions/123198/how-do-i-copy-a-file-in-python?rq=1) – Mark Snyder Jan 22 '20 at 22:42
  • @MarkSnyder no -- one file is opened locally and one is on a remote server. – David542 Jan 22 '20 at 22:45
  • What OS are your local and remote machines running? – Mark Snyder Jan 22 '20 at 22:51
  • @MarkSnyder locally it's a mac and remote is ubuntu. – David542 Jan 22 '20 at 22:51
  • Do you already have the capability to mount your remote server locally? Because as Isterzinger's answer suggests, if you do then you should be able to do it using the linked methods. – Mark Snyder Jan 22 '20 at 22:55

1 Answers1

0

If you're using software that can mount the remote server's directory locally, your operating system's file copy-paste system should be able to transfer the file over.

Otherwise, as you stated, a utility like scp, sftp, rsync, or similar would work very well for this.

lsterzinger
  • 687
  • 5
  • 22