SSH Authorized Keys – How to Use Command Option for Multiple Commands

commandssh

The authorized_keys has a command="…" option that restricts a key to a single command. Is there a way to restrict a key to multiple commands? E.g. by having a regex there, or by editing some other configuration file?

Best Answer

No. It is not "allowed" command, but "forced" command (as ForceCommand option).

The only possibility is to use different keys for different commands or read parameters from stdin.