Hi Folks,
On the internet there are numerous articles and forums topics talking about adding a line like:
Code:
command="/usr/bin/ls" <ssh-key-here>
To the file:
Code:
$HOME/.ssh/authorized_keys
And it will supposedly limit the command that the user can run.
Well it didn't!
So I can ssh from my client to the server when my authorized_keys file is like:
And cannot login when it is like:
Code:
command="/usr/bin/ls" <ssh-key-here>
The error is:
Code:
server.address.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Notice that the whole stack of network, operating system, ssh, configuration, keys, permission, etc works properly, UNTIL I add the command= to the beginning of the line. Then it does not work.
Please help. Thanks in advance.