March 3, 2026
Self‑lockout speedrun, courtesy of 777
Disable Your SSH access accidentally with scp
One copy command turned his “front door” into a wall — and the comments erupted
TLDR: Copying a too‑open folder into your home with scp made the server refuse logins until permissions were tightened; the fix was resetting the home folder to owner‑only. Commenters split between “expected behavior” and “dangerous footgun,” with tips like using “./*” and scripts to auto‑repair perms—and one browser gripe stealing a scene
Only-in-tech oops: a simple copy sent this user’s server into lockdown. After copying a folder to his home directory with scp (a tool that sends files over a secure connection), SSH—the digital door guard—rejected his key because the home folder became too open (permissions set to “anyone can touch this”). Resetting it to “owner only” flipped the lights back on. The full tale—and the log line smoking gun—is in the post.
Then the comments went spicy. One camp says it’s an obvious “you did this to yourself” moment: scp doesn’t just move files, it drags their permission settings along, so of course the bouncer said no. Another camp calls it a classic footgun—one innocent dot “.” can nuke your login—and begs for safer defaults or clearer warnings. Meanwhile, a side drama flared when a reader claimed the site looked like “markov chain gibberish” in an older Firefox, turning a tech whodunnit into a browser roast.
There were helpful hacks too: a tip to use “./*” instead of “.” to avoid copying the directory’s own vibe, and a logout script that auto-fixes permissions (“saved me 999 times,” flexed one commenter). The memes wrote themselves: “777 is the mark of the sysadmin beast,” and “OpenSSH as the club bouncer: ‘Your house is too open—no entry.’”
Key Points
- •SSH public key logins failed immediately after an scp transfer, showing 'Permission denied (publickey)'.
- •The home directory’s permissions had been changed to 777, causing OpenSSH to reject authentication.
- •OpenSSH server logs indicated 'Authentication refused: bad ownership or modes for directory /home/user'.
- •Reverting the home directory permissions to 700 restored SSH key-based access.
- •Root cause: running 'scp -r . host:' from a source directory with 777 permissions propagated permissive modes to the home directory.