How to use sshd_config - PermitUserEnvironment option

Posted by laks on Server Fault See other posts from Server Fault or by laks
Published on 2010-03-17T07:08:22Z Indexed on 2010/03/17 7:11 UTC
Read the original article Hit count: 303

Filed under:
|

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: http://www.raphink.info/2008/09/forcing-environment-in-ssh.html http://www.netexpertise.eu/en/ssh/environment-variables-and-ssh.html/comment-page-1#comment-1703

© Server Fault or respective owner

Related posts about sshd

Related posts about ssh