Written 30 Aug 2026. This is a how-to, not a product card.
Encode a file so you can paste it
After SSH works, turn a file into pasteable text with base64 so you can copy small text without a USB stick. You don't need a zip app for this.
Sometimes you want to paste a small file as text, without a USB stick. Tonight you encode a file as text: base64. Base64 turns bytes into pasteable text, and back. Start with a tiny practice file in home. You are still only practicing on the computer. It does not need a zip app for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. If pieces for a paste limit are what you want, that is split a file into smaller pieces. If shrink is what you want, that is shrink one file. If one file from the laptop is what you want, that is copy a file to the computer from your laptop.
What this is
base64 encodes a file so you can paste it. You type base64 ~/paste-me.txt. Text comes back. Decode with base64 -d. -w 0 means one long line, no wrap. Tonight: a tiny file, not a disk image. It is not gzip. Gzip shrinks. It is not split. Split cuts into pieces.
Practice base64 in home
SSH in. Make sure home is where you sit:
pwd
You want a path that ends in your login name. If not:
cd ~
Make a tiny practice file:
printf 'hello\n' > ~/paste-me.txt
cat ~/paste-me.txt
Encode:
base64 ~/paste-me.txt
Save the encoded text:
base64 ~/paste-me.txt > ~/paste-me.b64
cat ~/paste-me.b64
Decode it back:
base64 -d ~/paste-me.b64 > ~/paste-me-out.txt
cat ~/paste-me-out.txt
You want the same hello line. That is enough for tonight. Practice only in home.
Debian and Ubuntu usually already have base64. Don't make apt the job. If base64 is missing:
sudo apt install coreutils
Then stop. That install is not the lesson.
When you are done, throw the practice files away. Careful delete only. That is delete a file carefully. Skip rm -rf.
rm -i ~/paste-me.txt ~/paste-me.b64 ~/paste-me-out.txt
Useful extras, still home only
Optional: one long line, no wrap:
base64 -w 0 ~/paste-me.txt
Optional facts on the encoded file:
stat ~/paste-me.b64
Skip huge dumps and whole disks. Tonight: a tiny practice file.
What this is not
This is not split. That is split a file into smaller pieces. It is not gzip. That is shrink one file. It is not tar. That is pack files into one archive. It is not scp. That is copy a file to the computer from your laptop. It is not echo. That is put a short line into a file. It is not opening SSH to the internet. That is keep the computer on the house network. Don't forward port 22.
What next
Need pieces? Split a file into smaller pieces. Need shrink? Shrink one file. Need one file from the laptop? Copy a file to the computer from your laptop. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.
Skip
- Skip if SSH still fails. Finish SSH from the couch first.
- Skip huge dumps and whole disks. Tonight: a tiny practice file.
- Skip gzip, tar, split, and scp as tonight's job. Those pages already exist.
- Skip files under
/etc, SSH folders, or paths you don't own. Practice only in home. - Skip
rm -rf. Careful delete only: delete a file carefully. - Skip opening SSH to the internet so you can do this from a coffee shop. That is keep the computer on the house network. Don't forward port 22.
Sources
Debian: base64. Ubuntu: base64. GNU coreutils: base64 invocation. Official pages only. For the login, see SSH from the couch. For pieces, see split a file into smaller pieces.