SSH / SFTP / Rsync — User Guide
Electric Monk provides direct command-line access to your cloud storage via
SSH at cs.electricmonk.io. You can use SFTP for interactive file
browsing and rsync for efficient folder synchronisation.
Authentication is public-key only — password login is disabled. You must register at least one SSH public key through the portal before connecting.
1. Generate an SSH Key (if you don't have one)
If you already have an SSH key (check for ~/.ssh/id_ed25519.pub or
~/.ssh/id_rsa.pub), skip to step 2.
macOS / Linux
ssh-keygen -t ed25519 -C "your-email@example.com"
Press Enter to accept the default file location (~/.ssh/id_ed25519).
Set a passphrase when prompted (recommended).
Windows (PowerShell)
ssh-keygen -t ed25519 -C "your-email@example.com"
The key pair is saved to C:\Users\<you>\.ssh\id_ed25519 by default.
Copy your public key to the clipboard
# macOS
pbcopy < ~/.ssh/id_ed25519.pub
# Linux (requires xclip)
xclip -sel clip < ~/.ssh/id_ed25519.pub
# Windows (PowerShell)
Get-Content ~\.ssh\id_ed25519.pub | Set-Clipboard
2. Upload Your Key via the Portal
- Go to portal.electricmonk.io
- Log in with your Authentik credentials
- On the dashboard, click Manage SSH Keys
- Under Add a Key, paste your public key into the text area
(it starts with
ssh-ed25519orssh-rsa) - Click Add Key
The portal shows a confirmation and the SSH server restarts automatically. Your key is usually active within 30 seconds.
You can see your connection details on the same page:
| Field | Value |
|---|---|
| Host | cs.electricmonk.io |
| Port | 22 |
| User | Your Authentik username |
To remove a key, click the Remove button next to it.
3. Test Your Connection
ssh youruser@cs.electricmonk.io
Note: The server provides file-transfer access only. An interactive shell is available but your home directory is your cloud storage root.
4. SFTP Examples
Interactive session
sftp youruser@cs.electricmonk.io
Useful commands inside the SFTP session:
| Command | Description |
|---|---|
ls |
List remote files |
cd photos |
Change remote directory |
lcd ~/Desktop |
Change local directory |
put file.txt |
Upload a file |
put -r ./folder |
Upload a folder recursively |
get report.pdf |
Download a file |
get -r ./projects |
Download a folder recursively |
mkdir backups |
Create a remote directory |
rm old-file.txt |
Delete a remote file |
exit |
Disconnect |
One-liner uploads and downloads
# Upload a single file
sftp youruser@cs.electricmonk.io <<< 'put ~/Documents/report.pdf'
# Download a file to the current directory
sftp youruser@cs.electricmonk.io:photos/vacation.jpg .
5. Rsync Examples
rsync is ideal for syncing large or frequently-changing directories.
It only transfers files that have changed.
Upload (local → remote)
# Sync a folder to your cloud storage
rsync -avz ~/Projects/website/ youruser@cs.electricmonk.io:~/website/
# Dry run — see what would be transferred without doing it
rsync -avzn ~/Projects/website/ youruser@cs.electricmonk.io:~/website/
Download (remote → local)
# Sync your remote photos to a local folder
rsync -avz youruser@cs.electricmonk.io:~/photos/ ~/Photos/cloud-photos/
Mirror (delete files on the destination that don't exist on the source)
rsync -avz --delete ~/Backups/ youruser@cs.electricmonk.io:~/backups/
⚠️ Careful with
--delete— it removes files on the remote that aren't present locally. Use--dry-run(-n) first to preview.
Exclude patterns
rsync -avz --exclude='node_modules' --exclude='.git' \
~/Projects/myapp/ youruser@cs.electricmonk.io:~/myapp/
Bandwidth limit
# Limit to 5 MB/s (useful on metered connections)
rsync -avz --bwlimit=5000 ~/Videos/ youruser@cs.electricmonk.io:~/videos/
Common Options Reference
| Flag | Meaning |
|---|---|
-a |
Archive mode (preserves permissions, times) |
-v |
Verbose output |
-z |
Compress data during transfer |
-n |
Dry run (preview only) |
--delete |
Remove remote files not present locally |
--progress |
Show per-file transfer progress |
--bwlimit=N |
Limit bandwidth to N KB/s |
-e "ssh -p PORT" |
Use a non-default SSH port |
Troubleshooting
- "Permission denied (publickey)" — your key isn't registered. Go to portal.electricmonk.io/ssh and add it.
- "Connection refused" — the SSH server may be restarting after a key change. Wait 30 seconds and retry.
- "Host key verification failed" — the server's host key changes when
the pod restarts. Remove the old entry with
ssh-keygen -R cs.electricmonk.ioand reconnect. - Slow transfers — rsync with
-zcompresses in transit. For very large files that are already compressed (videos, ZIPs), try without-z.