Prerequisites
-
If you intend to use
runpodctl, make sure it’s installed on your machine, see install runpodctl -
If you intend to use
scp, make sure your Pod is configured to use real SSH. For more information, see use SSH. -
If you intend to use
rsync, make sure it’s installed on both your local machine and your Pod withapt install rsync. - Note the public IP address and external port from the SSH over exposed TCP command (you’ll need these for the SCP/rsync commands).
Transferring with runpodctl
The Runpod CLI (runpodctl) provides simple commands for transferring data between your machine and Runpod. It’s preinstalled on all Runpod Pods and uses one-time codes for secure authentication, so no API keys are required.Sending a File
To send a file from source machine:Receiving a File
To receive a file on destination machine:Transferring with SCP
The general syntax for sending files to a Pod with SCP is as follows (execute this on your local machine, and replace the x’s with your Pod’s external TCP port and IP; for this example, they are 43201 and 194.26.196.6, respectively):If your private key file is in a location other than
~/.ssh/id_ed25519 or you’re using the Windows Command Prompt, make sure you update this path accordingly in your command.-r flag to recursively copy files and subdirectories (this will follow any symbolic links encountered as well):
Transferring with rsync
Your local machine must be running Linux or a WSL instance in order to use rsync.
-a/--archive- archive mode (ensures that permissions, timestamps, and other attributes are preserved during the transfer; use this when transferring directories or their contents)-d/--delete- deletes files in the destination directory that are not present in the source-p/--progress- displays file transfer progress-v/--verbose- verbose output-z/--compress- compresses data as it’s being sent and uncompresses as it’s received (heavier on your CPU, but easier on your network connection)