2012/01/08

User env & non-interactive ssh

HP-UX has /etc/PATH which is read by /etc/profile except when you use ssh for remote command execution.

The trick to get a custom PATH is to add this to authorized_keys:

...
environment="BASH_ENV=.profile" ssh-dss AAAAB3NzaC1k{rest of relevant key}
...



Also check that this is set in sshd_config:

PermitUserEnvironment yes

check before/after with: ssh server env

No comments: