Java Ninja Chronicles By Norris Shelton

Things I learned in the pursuit of code

Your environment (env) isn’t the same environment you get when you ssh into a machine. It isn’t even the same environment you get when you rlogin into the same machine. Consider [sourcdcode language=”bash”]ssh host env[/sourcecode]. The list is much shorter.

To add to the ssh environment, modify


on the target host and add in the properties:


Then turn on the ability to have a user defined ssh environment by modifying


Change “PermitUserEnvironment no” to “… yes”. You will then need to bounce the ssh service. It looks like the following commands should work:

/etc/init.d/sshd [restart | start | stop]

January 11th, 2011

Posted In: Bash, SSH

Leave a Comment

WP to LinkedIn Auto Publish Powered By :