Re: Activity of the $HOME/.kshrc



On Wed, Mar 04, 2009 at 04:38:18PM -0700, Jialing Liang wrote:
I have ssh login to two Linux - Openssh server. They share one $Home
directory. server1 runs Redhat 3 with Openssh 3.6.1 and sever2 runs
Redhat 5 with Openssh 4.3

You probably mean Red Hat Enterprise, not Red Hat. Red Hat 5.x (December
1997) is unlikely to have such a new version of OpenSSH, and Red Hat 3.x
is pretty ancient (May 1996).

The problem is: If I type "ssh server1 set" in a local host it shows the
variable defined in $HOME/.kshrc. However, the "ssh server2 set" does
not show the variable defined in the same $HOME/.kshrc file.

Check the user's shell and make sure it's actually ksh.

$ cat $HOME/.ssh/environment
ENV=$HOME/.kshrc

If the user's shell is (for example) bash or sh or csh, this variable
won't have any effect.



Relevant Pages