Files
roro9stack/site/content/howto/scp.md
T
twislaandClaude Sonnet 5.5 18285c3212
CI / build (pull_request) Failing after 1m59s
Site / build (pull_request) Successful in 9s
Add uname, /uname and scp (key or masked password) in the Shell
- uname in the console and /uname in IRC: the firmware, its version and the chip
- scp: one file between the card and a trusted server, over SSH, with the
  device's key or a password asked (masked) in the Shell
- shared libssh helpers in src/platform/libssh_util
- README, user guide, command reference and a how-to updated

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
2026-10-09 19:01:36 +02:00

41 lines
2.1 KiB
Markdown

+++
title = "Copy a file to or from a server"
description = "Send a note from the SD card to a server, or fetch a log from it, with scp in the Shell."
weight = 14
[extra]
tag = "SSH"
+++
One file at a time, between the SD card and a server you can log in to over SSH.
1. **Connect to the server once in the SSH App** (**SSH → New connection**, `user@host`) and trust its fingerprint. `scp` can't ask that question, so it only goes to servers it has met there.
2. For no password to type, put the device's key on the server: [Log in to a server without a password](/howto/ssh-key/). Without it, `scp` asks for the password.
3. Open the **Shell** and type, for a file going **to** the server:
```
scp /notes/a.txt user@host:docs/a.txt
```
or one coming **from** it, into a folder on the card (it keeps its name):
```
scp user@host:/var/log/syslog /logs/
```
You should see `scp: ... (1234 bytes) to ...`, then `scp: sent 1234 bytes in 310 ms` (or `received`).
4. If it says `password for host`, type it and press <kbd>Enter</kbd>: it shows as stars and is kept nowhere. <kbd>Back</kbd> cancels.
## If it doesn't work
| It says | Do |
|---|---|
| `is not a server this device trusts yet` | Step 1: connect once in the SSH App |
| `showed a different key than the one remembered` | The server was reinstalled, or something answers in its place. Check in the SSH App, which asks what to do |
| `exists already` | The file is on the card: add `-f` (`scp -f user@host:x /notes/x`) to replace it |
| `An SSH session is open` or `Not enough memory` | End the session (`ssh stop`), or close IRC or a Gemini page: [not enough memory](/howto/not-enough-memory/) |
| `not logged in`, `wrong password` | Three tries, then it stops. Check the user, or the key on the server |
| `a password is only asked in the Shell` | You typed it from a PC on the USB port or the Debug Console: use the Shell, or put the key on the server |
| `that isn't a plain file` | `scp` copies one file, not a folder |
Another port goes first: `scp -P 2222 /notes/a.txt user@host:a.txt`. `cancel` stops a copy that is running.