In the following example I want to delete the improper ssh-key entries from an authorized_keys file.
Ex.
sed -e '/^environment.*USER.*/!d' .ssh/authorized_keys
I do not allow usage of ssh session without set USER environment variable.
Put your favourite unix on
sed -e '/^environment.*USER.*/!d' .ssh/authorized_keys
No comments:
Post a Comment