[ENG] Runyour AI
HOMEDISCORD
  • Direct Link to runyourAI
  • 🎉Welcome to Runyour AI
  • 🌠What's New
    • v1.7.2 (2024.10.21)
    • v1.7.0 (2024.10.07)
    • v1.6.2 (2024.09.24)
    • v1.6 (2024.08.20)
    • v1.5 (2024.07.11)
    • v1.4 (2024.06.17)
    • v1.3 (2024.05.29)
    • v1.2 (2024.04.17)
    • v1.1 (2024.04.01)
    • v1.0 (2024.03.04)
  • ❓FAQ
  • ☎️Contact
  • [Start runyour AI]
    • Create an Account
    • Manage an Account
  • [GPU Cloud]
    • Machine List
    • Machine Rental
      • Hourly Plan
        • Recharge Points
        • Hourly Plan Machine Rent
        • Hourly Plan Machine Stop and Return
      • Monthly Subscription Plan Machine
        • Card Register
        • Monthly Subscription Plan Rent
        • Monthly Subscription Plan Stop and Return
  • [Dev Cloud]
    • How to Use
      • Machine Rental
      • Machine Usage
      • Machine Return
  • [Reserved Cloud]
    • How to Use
      • Request a Quote
      • Machine Usage
  • [Utilize Storage]
    • Storage List
    • Hourly Storage
      • Create an Hourly Storage
      • Link an Hourly Storage
    • Long term Storage
      • Create a long-term Storage
      • Link a long-term Storage
  • [Tutorial]
    • Remote Access via SSH (common)
    • Using Stable-diffusion
    • Using Jupyter AI Labs
    • File Transfer Between Machines-Users
    • Handling Errors When Connecting to Machines
    • Fixing PEM Key File Permission Issues
  • [Register Machines]
    • Machine Registration Requirements
    • Register a Machine
    • Manage a Machine
    • Profit Withdrawal
  • [Terms and Conditions]
    • Terms and Conditions
      • Terms_Consumers
      • Terms_Suppliers
      • Privacy Policy
Powered by GitBook
On this page
  • 1. Using SCP for File Transfer
  • 1. Windows (Local Computer) ↔︎ Ubuntu (Remote Machine)
  • 2. mac OS(My Computer) ↔︎ Ubuntu (remote machine)
  • 2. Croc CLI Tool for File Transfer
  • 1. Installation
  • 2. How to Use
  1. [Tutorial]

File Transfer Between Machines-Users

Guide to Easy File Transfer!

PreviousUsing Jupyter AI LabsNextHandling Errors When Connecting to Machines

Last updated 5 months ago

To transfer files between Machines and Users:

✔️ All RUAI machines are based on Ubuntu OS. When transferring files between your local computer and a rented machine, you need to use the terminal.

✔️ This guide covers the usage of scp and croc.


1. Using SCP for File Transfer

1. Windows (Local Computer) ↔︎ Ubuntu (Remote Machine)

Windows (Local Computer) → Ubuntu (Remote Machine)

✔️ For Windows 10, ensure that the OpenSSH Client is enabled.

  • Navigate to [Settings] → [Apps & Features] → [Optional Features] to verify if OpenSSH is installed.

✔️ Then, open a terminal (CMD) or PowerShell and use the scp command to transfer files or directories to the remote destination.

  • The format for sending is as follows:

scp -P [machine development environment port] [path of file to send (can be dragged and dropped)] [username]@machine.runyour.ai:[remote machine storage path]

-To fill in the [] placeholders, click the [Open Development Environment] button on the rented machine to retrieve SSH connection information.

  • When sending a file:

scp -P 30002 C:\image\image.zip ruai@machine.runyour.ai:/home/ruai
  • When sending a folder:

scp -r -P 30002 C:\image\image.zip ruai@machine.runyour.ai:/home/ruai

Ubuntu (remote machine) -> Windows (local computer)

✔️To retrieve files or folders from a remote machine to your own computer, simply reverse the command.

  • Format for sending

scp -P [remote machine port] [username]@machine.runyour.ai:[remote file or folder path] [location to save on your computer]
  • When retrieving a file:

scp -P 30002 ruai@machine.runyour.ai:/home/ruai/image.zip C:\image
  • When retrieving a folder:

scp -r -P 30002 ruai@machine.runyour.ai:/home/ruai/image.zip C:\image

2. mac OS(My Computer) ↔︎ Ubuntu (remote machine)

Check the development environment before file transfer.

macOS (local computer) → Ubuntu (remote machine)

  • Format for sending:

scp -P [remote machine port] [path of the file to send (drag and drop to display the path)] [username]@machine.runyour.ai:[remote machine destination path]
  • Example for sending a file:

scp -P 30002 /Document/image/image.zip ruai@machine.runyour.ai:/home/ruai
  • Example for sending a folder:

scp -r -P 30002 /Document/image/image.zip ruai@machine.runyour.ai:/home/ruai

Ubuntu (remote machine) → macOS (local computer)

  • Format for sending:

scp -P [remote machine port] [username]@machine.runyour.ai:[remote file or folder path] [location to save on your computer]
  • Example for retrieving a file:

scp -P 30002 ruai@machine.runyour.ai:/home/ruai/image.zip /Document/image
  • Example for retrieving a folder:

scp -r -P 30002 ruai@machine.runyour.ai:/home/ruai/image.zip /Document/image

2. Croc CLI Tool for File Transfer

Croc is a CLI-based tool for easily transferring data between two computers.

It utilizes relay for data transfer and applies end-to-end encryption.

It supports cross-platform compatibility (Windows, Linux, macOS) and allows for multi-file transfers.

1. Installation

Unix

Open a terminal and run the following command to install:

nix-env -i croc

Ubuntu

Open a terminal and run the following command to install:

wget https://github.com/schollz/croc/releases/download/v10.0.10/croc_v10.0.13_Linux-64bit.tar.gz
tar -xvf croc_v10.0.13_Linux-64bit.tar.gz
cp ./croc /usr/local/bin

macOS (requires Homebrew)

Open a terminal and run the following command to install:

brew install croc

Windows (requires scoop, choco, or winget)

For this guide, we'll use scoop for installation. First, run Windows PowerShell as an administrator and execute the following two commands sequentially to install scoop:

1 // Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

2 // Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

Then proceed to install croc:

1 // # If using scoop
2 // scoop install croc
3 // 
4 // # If using choco
5 // choco install croc
6 // 
7 // # If using winget
8 // winget install schollz.croc

2. How to Use

Open a terminal and connect to the remote machine.

Both the sender and receiver should open their terminals and execute the following commands based on their roles.

Sending a File

croc send [path to the file to be sent (you can set the path by dragging and dropping the file)]

Executing the above command will display a generated code in the terminal:

Code is : [code]

The recipient should enter this code to receive the file.

Receiving a File

croc [code generated when sending the file]

Enter the code generated during the file transmission to receive the file.

Example

Sender - Sending a file (execute from your local computer or remote machine's terminal)

1 // > croc send C:\image\image.zip
2 // Sending 'image.zip' (25182 B)
3 // # Code is generated.
4 // Code is: 0406-milk-parker-small
5 // On the other computer run

Receiver - Retrieving a file (execute from your local computer or remote machine's terminal)

1 // > taster@machine-runyourai-1:~$ croc 0406-milk-parker-small
2 // Accept 'image.zip' (25182 B)? (Y/n) // Press Enter
3 //
4 // ...
5 // image.zip 100% |████████████████████|