On Tue, Jul 10, 2007 at 11:29:40AM -0600, Jialing Liang wrote:
> Thanks for the detailed reply. My problem is the $HOME is shared:
> If I want to have "barney=rubble" for host1 and "barney=block" for
> host2, and the $HOME/.ssh/environment and $HOME/.kshrc are shared
> between host1 and host2, so I am facing what to put.
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
Now we're back to what I said in the very first reply I made in this
thread.