Restrict SSH Key to Specific Commands
View on Twitter
💡 You can restrict/force an SSH key to one command and prevent granting full access to a server.
👉🏼 Prepend the key in `authorized_keys` file with `command=""` (e.g.: `command="pm2 restart" ssh-rsa AAAAB3N...`).