Accidentally disabling SSH access via scp
44 points by sny
44 points by sny
Oh, it’s interesting that there was actually a bug in scp! It clobbered permissions on the target even when the -p option was not used. Thanks for getting that fixed :-)
Nice write-up! And wow, subtle problem.
I think I'd probably use rsync for this. I should check to see whether it'd do the same thing, though I doubt I'd ever point it at my whole home directory.
In my head I have known for some time that rsync is almost always the thing to use over scp, but my muscle memory hasn't caught up yet.
Nice catch. On the other hand running scp -r . host: has never, ever crossed my mind before.
JFTR, the bug report seems to be either non-public or only for logged-in users.