Re: [CentOS] Allow execution of commands via ssh but not to login

2017-01-12 Thread Leonard den Ottolander
Hello Bernard, On Wed, 2017-01-11 at 10:59 -0500, Bernard Fay wrote: > I made my search on google way to complicated for nothing :( Only way to learn is from your mistakes ;-) . > Thanks John and Seb! authorized_keys will do the job. If you need interactive login for f.e. sftp you should h

Re: [CentOS] Allow execution of commands via ssh but not to login

2017-01-11 Thread Bernard Fay
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 wrote: > Hi, > > you can use the option command your /home/user/.ssh/authorized_keys . > > for example : > > command="cd /some_where;

[CentOS] Allow execution of commands via ssh but not to login

2017-01-11 Thread Bernard Fay
Hi, Is there a way to allow a user to execute commands via ssh, for example: "ssh user@server ls", but disallow the same user to login on this server with "ssh user@server" ? Thanks, Bernard ___ CentOS mailing list CentOS@centos.org https://lists.cent

Re: [CentOS] Allow execution of commands via ssh but not to login

2017-01-11 Thread seb
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@server

Re: [CentOS] Allow execution of commands via ssh but not to login

2017-01-11 Thread John Hodrien
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@server ls", but disallow the same user to login on this server with "ssh user@server" ? Google "ssh restrict to single command". First hit covers using the command