Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have client1 and client2 both are Linux machines. From client1:

client1$ssh root@client2 "env"

It displays list of ssh variables from client2.

Things I did on client2:

I want to add new variable to client2 . So I edited sshd_config to

PermitUserEnvironment yes

and created a file environment under ssh with following entry

Hi=Hello

then restart sshd

/etc/init.d/sshd

Now from client1 trying the same command

client1$ssh root@client2 "env"

didn't provide the new variable Hi.

ref:

share|improve this question
1  
done. "environement" file should be under ~/.ssh not under /etc/ssh It's working fine. Hope this somebody. –  laks Mar 17 '10 at 9:30
1  
Not /etc/ssh/environment for sure, but /etc/environment should work (at least it does for me). –  ℝaphink Sep 16 '10 at 16:37

1 Answer 1

and created a file environment under ssh with following entry Hi=Hello

You should create the file /root/.ssh/environment on client2, assuming that /root is the home directory of root.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.