Conversation
Notices
-
Embed this notice
silverwizard (silverwizard@convenient.email)'s status on Thursday, 12-Jan-2023 14:01:54 JST silverwizard @hal_pomeranz for user in `find /home/ -maxdepth 1 -type d` do mkdir $user/.ssh touch $user/.ssh/authorized_keys done
It's not pretty, and not really a one liner and I'm user someone who knows xargs better than me could do it with piping the find command. But making the file owned by root will let only me use it unless I need the user to be able to use it.
This is if I wanna do it in an emergency, and if I wanted to do this longterm, I'd just edit /etc/ssh/sshd_config-
Embed this notice
Hal Pomeranz (hal_pomeranz@infosec.exchange)'s status on Thursday, 12-Jan-2023 14:01:56 JST Hal Pomeranz The admin wants to prevent users from creating their own authorized_keys files. How could this be accomplished?
-
Embed this notice