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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content