How to restrict users to execute specified commands when ssh to remote server?

Updated -

Release Found: Red Hat Enterprise Linux 4,5:

Problem:

In some environments, it's necessary to restrict remote users to log-in in ssh-server and run some specified commands.

Use asymmetric key to authorize users and add some useful options in authorized_keys file will be very useful.

Solution:

Below is a example:

If user root is allowed to execute...

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.