Results 1 to 2 of 2
I have a question in regards to the user environment when you ssh to a machine. Currently, I set the sshd_config file to PermitUserEnvironment yes This is what I have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-02-2012 #1
- Join Date
- Jun 2012
SSH environment question
I have a question in regards to the user environment when you ssh to a machine.
Currently, I set the sshd_config file to PermitUserEnvironment yes
This is what I have always done and it has always worked. I then take a snapshot of the user environment and create my environment file in the .ssh directory.
I have a new server that is not acting the way I want. If I ssh to the new machine ssh user@server then my environment settings are there.
However, if I run a command remotely such as ssh user@server 'env' it does not return the proper settings. It seems to only have the default environment and not all the settings I have in the environment file.
Does anyone know how to use the environment file with the remote commands?
I ask because we have a server that runs a series scripts remotely and we need that script directory in our path to work properly. Otherwise we have to alter 100+ scripts with the full path or ./ in order for them all to work. Since we have it configured properly on the other servers, I would like to fix the configuration on this one server rather than have to alter all our scripts.
Nevermind. I found out the problem. Our system admin misspelled environment. I found the issue on all my new servers he set up and everything works the way I want.
Last edited by jedlickaj; 07-03-2012 at 12:06 AM.
- 11-04-2012 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
This is when you are supposed to close the thread...Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!