Written 28 Aug 2026. This is a how-to, not a product card.
Edit a file from the couch
After SSH works, open a file with nano, change a line, and save. The keys at the bottom of the screen are the whole trick. You don't need a new editor.
SSH from the couch lets you type commands on the computer. Sometimes the computer already has a file you need to change: a note, a share path, a line in a config. nano is a small text editor that is already on Debian and Ubuntu. You run it in the SSH window. The computer does not need VS Code, vim, or a USB stick for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. A short name is nicer: give the computer a short name on your laptop. If you only need to move a file that already lives on the laptop, that is copy a file to the computer from your laptop. This note is nano after you have logged in. Laptop-side nano for the SSH nickname is on the short-name note. Skip this whole note if you are not changing a file tonight.
What this is
nano opens a file in the SSH window. The bottom two lines are keyboard shortcuts. The caret ^ means Ctrl. You type, save, quit. The computer writes the file. On most Debian and Ubuntu installs, nano is already there. It is not vim. If you typed vim by accident and the screen looks stuck, type :q! and Enter to leave without saving, then start over with nano.
Practice on a throwaway file first
Don't start on a login file. SSH in, then make a file that does not matter:
echo 'hello' > ~/nano-practice.txt
Then open it:
nano ~/nano-practice.txt
You should see the words, a cursor, and those two shortcut lines at the bottom. Add a second line. That is enough for a first save.
Save and quit
The three keys you actually need:
- Ctrl+O writes the file (think “out”). nano asks for the filename. Enter keeps the same name.
- Ctrl+X leaves nano. If you changed something and forgot to save, it asks. Y then Enter saves. N discards.
- Ctrl+C cancels the question nano is asking, if you typed the wrong name.
Arrow keys move. Backspace deletes. Optional later: Ctrl+K cuts the whole line, Ctrl+U pastes it back. You don't need those tonight.
Check it landed
Back at the prompt:
cat ~/nano-practice.txt
You want your new line in the print. That print command is read a file without opening the editor. Optional look at size and date:
ls -lh ~/nano-practice.txt
Delete the practice file when you are done playing:
rm ~/nano-practice.txt
Before you edit a real file, copy it
A config is easier to undo if you kept the old one. For a file in your home folder:
cp ~/notes.txt ~/notes.txt.bak
Then:
nano ~/notes.txt
Swap the filename for yours. If the original was fine, copy the .bak back over it later. Skip this extra copy on the throwaway practice file.
Optional: a system file
Files under /etc need admin. Confirm you can use sudo first: see if your login can use admin commands. Then:
sudo nano /etc/hostname
That hostname file is the computer's name. Changing it for real is give the computer a name that sticks, not a random edit. Don't open SSH settings tonight. Turning off password login is turn off password login once the key works, and it has a safer order than “open sshd_config and guess.”
If nano is missing
Some skinny leftover installs skip it. Ask:
nano --version
If that says command not found, install it the same way as other fixes: keep the computer updated, then:
sudo apt update && sudo apt install -y nano
Skip buying an editor app. Skip vim as a first editor.
What next
Need an empty file before you edit? Make an empty file. Want a spare before you edit? Copy a file without leaving the computer. Need the file on the laptop too? Copy a file to the computer from your laptop (paths swap to pull one back). Cleaning leftover Marketplace keys uses this same editor: see which laptop keys the computer already trusts. Tired of retyping the same long line? Reuse a command you already typed. Want to see the names in the folder first? See what's in a folder. When key login is boring on every computer you use, turn off password login once the key works. 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 buying VS Code, a “cloud IDE,” or a KVM for a one-line change.
- Skip starting with vim. Use nano until this is boring.
- Skip editing
/etc/ssh/sshd_configfrom this note. That harden step is turn off password login once the key works. - Skip opening SSH to the internet so you can edit from a coffee shop. That is keep the computer on the house network.
Sources
GNU nano. GNU nano: nano(1). Debian: nano. Ubuntu: nano. Official pages only. For the login, see SSH from the couch. For a short name, see give the computer a short name on your laptop. For moving a file without editing it, see copy a file to the computer from your laptop. For sudo, see see if your login can use admin commands.