Skip to content

Restrict SSH Key to Specific Commands

💡 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...`).

A preview of the VPS Security Cheatsheet.

Download the VPS Security Cheatsheet

No spam! 🙅🏻‍♀️ Unsubscribe at any time.