Bernard Fay
2017-Jan-11 15:34 UTC
[CentOS] Allow execution of commands via ssh but not to login
Hi, Is there a way to allow a user to execute commands via ssh, for example: "ssh user at server ls", but disallow the same user to login on this server with "ssh user at server" ? Thanks, Bernard
John Hodrien
2017-Jan-11 15:38 UTC
[CentOS] Allow execution of commands via ssh but not to login
On Wed, 11 Jan 2017, Bernard Fay wrote:> Hi, > > Is there a way to allow a user to execute commands via ssh, for example: > "ssh user at server ls", but disallow the same user to login on this server > with "ssh user at server" ?Google "ssh restrict to single command". First hit covers using the command option in authorized_keys. jh
Hi, you can use the option command your /home/user/.ssh/authorized_keys . for example : command="cd /some_where; other command , ssh-rsa key ....." Le 11/01/2017 ? 16:34, Bernard Fay a ?crit :> Hi, > > Is there a way to allow a user to execute commands via ssh, for example: > "ssh user at server ls", but disallow the same user to login on this server > with "ssh user at server" ? > > > Thanks, > Bernard > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos
Bernard Fay
2017-Jan-11 15:59 UTC
[CentOS] Allow execution of commands via ssh but not to login
I made my search on google way to complicated for nothing.... :( Thanks John and Seb! authorized_keys will do the job. On Wed, Jan 11, 2017 at 10:40 AM, seb <sebastien at r2-info.fr> wrote:> Hi, > > you can use the option command your /home/user/.ssh/authorized_keys . > > for example : > > command="cd /some_where; other command , ssh-rsa key ....." > > > > > Le 11/01/2017 ? 16:34, Bernard Fay a ?crit : > >> Hi, >> >> Is there a way to allow a user to execute commands via ssh, for example: >> "ssh user at server ls", but disallow the same user to login on this server >> with "ssh user at server" ? >> >> >> Thanks, >> Bernard >> _______________________________________________ >> CentOS mailing list >> CentOS at centos.org >> https://lists.centos.org/mailman/listinfo/centos >> > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
Possibly Parallel Threads
- Allow execution of commands via ssh but not to login
- Allow execution of commands via ssh but not to login
- how to resize a partition of a disk define as a physical volume
- Fix for the CVE-2017-7494?
- Failed to find sambaDomain object to get sambaAlgorithmicRidBase