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.
This is when you are supposed to close the thread...