User profile not being read by ksh when executing a command over ssh

Solution Verified - Updated -

Issue

When a user has /bin/ksh as the default shell, the user profile in ~/.profile or ~/.kshrc is not read when executing commands over ssh directly:

# ssh foobar@server.example.com command

It does work as expected in bash.

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8

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