On Wednesday, July 11, 2007 6:48 AM, Greg Wooledge wrote:
>1) Set "PermitUserEnvironment yes" in sshd_config.
>2) Put "ENV=$HOME/.kshrc" in ~/.ssh/environment on the server.
>3) Put your public key in ~/.ssh/authorized_keys on the server.
>4) In ~/.kshrc on the server, put:
>
>    case $(hostname) in
>      host1) barney=rubble;;
>      host2) barney=block;;
>    esac

Yes, that's the hint! It works.
In my environment, the 'ENV=$HOME/.kshrc' is critical, otherwise it does
not work.
Thanks again for your time and guide.

Regards,

Jialing Liang
[EMAIL PROTECTED]

Reply via email to