OpenViSTAI · Agents · Blockchain · Crypto
Menu

OPENVIST LEARN · FREE LESSONS

Move a practice file between your computer and VPS

Download the file you created, then upload a separate copy.

Lesson 6 of 10 · About 20 minutes · Beginner · English

By the end of this lesson

Transfer a file in both directions and recognise which path belongs to which computer.

Before you start

  • Lesson 5; hello.txt exists on the VPS.
  • A second local terminal window, not connected by SSH.

Three words to know

scp
A command for copying files over an SSH connection.
Remote path
A path paired with a host, such as username@host:folder/file.
Destination
The place where the copied file will be written.

1. Choose a local working folder

Create a local folder on macOS or LinuxLOCAL · macOS/Linux
mkdir -p "$HOME/openvist-learn-local"
cd "$HOME/openvist-learn-local"
pwd
What you should see · example output
A local path ending in /openvist-learn-local.
Create a local folder in PowerShellLOCAL · Windows PowerShell
New-Item -ItemType Directory -Force "$HOME\openvist-learn-local"
Set-Location "$HOME\openvist-learn-local"
Get-Location
What you should see · example output
A local Path ending in openvist-learn-local.

Use only the block for your operating system. Keep the SSH window open separately. If you run scp from inside the SSH session, its local side is the VPS, not your laptop.

2. Download from the VPS

Edit the login, then download into the current local folderLOCAL · macOS/Linux/Windows PowerShell

Edit the username and documentation-only address before running.

scp learner@203.0.113.10:openvist-learn/hello.txt .
What you should see · example output
The transfer completes and hello.txt appears in your current local folder.

The colon separates the remote host from its path. Here the remote relative path starts at that account’s home directory. The final dot is the local destination: your current folder. This can replace an existing local hello.txt, so use the dedicated practice folder.

3. Upload as a different filename

Send a separate copy backLOCAL · macOS/Linux/Windows PowerShell

Edit the username and documentation-only address before running.

scp ./hello.txt learner@203.0.113.10:openvist-learn/hello-upload.txt
What you should see · example output
The transfer completes. The original hello.txt stays in place on the server.
Check the uploaded file in your SSH windowVPS · Bash
cd "$HOME/openvist-learn"
cat hello-upload.txt
What you should see · example output
Hello from OpenViST.
I know which computer I am using.

The remote destination folder must already exist. If your SSH login uses a custom port, scp uses uppercase -P for the port, whereas ssh uses lowercase -p. Follow the same authentication method as your working SSH connection.

When a transfer cannot find a file

  • stat local or a local path error: inspect the source on the computer running scp.
  • A remote path error: inspect the named folder in your SSH session.
  • A successful download does not automatically open a report. Look in the local folder printed before the transfer.

YOUR TURN

A small check before you continue

Explain the dot at the end of the download command. Does the second transfer create a file on your laptop or on the VPS?

Show a suggested answer

The dot is the current local folder. The second command uploads to the VPS under the name hello-upload.txt.

Sources and scope

Documentation and examples reviewed 2026-10-18. Provider screens, package versions and output wording can differ. Examples show expected outcomes; they are not a claim that OpenViST connected to your server or verified your setup.