Operating System - HP-UX
1833016 Members
2466 Online
110048 Solutions
New Discussion

ssh environment configuration

 
Andrei Ghinescu
New Member

ssh environment configuration

i need to launch ssh user@IP "something" a remote command but when i do so something is not executed because it's not part of current PATH or there's no environment variable set to help me for that. Actually by doing this remote thing user's profile is not loaded but some general profile.
Can you help me with this issue?

Thanks

 

 

 

Moved from HP-UX Technical Documentation to HP-UX > security

6 REPLIES 6
Bill Thorsteinson
Honored Contributor

Re: ssh environment configuration

SSH loads a very limited and safe environment.
You can add and adjust the environment
by setting values in $HOME/.ssh/environment.
This is read and loaded by ssh during startup.

Alternatively, and safer, run a script that
configures the environment and runs your command or use a fully qualified path like
/usr/local/bin/mycommand.
Andrei Ghinescu
New Member

Re: ssh environment configuration

If I don't have any environment file in .ssh folder should i manualy create it?
And later on detail what i need to set in there?
But what about the path it's importing anyway ? Where from does it take that?
Ivan Ferreira
Honored Contributor

Re: ssh environment configuration

For simplicity and security reasons, is always advisable to run the command specifying the full path.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Andrei Ghinescu
New Member

Re: ssh environment configuration

What if I need to run an oracle command? i can give ful;l path but still i need oracle home set ...
Andrei Ghinescu
New Member

Re: ssh environment configuration

problem solved. thanks for trying to help.
Andrei Ghinescu
New Member

Re: ssh environment configuration

thread closed