- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ssh PATH problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 07:55 AM
01-30-2004 07:55 AM
ssh PATH problem
ssh -l username hostname commandstring
Because a shell never actually starts, I'm stuck with the path HP used at compile time. The ssh docs seem to indicate a few possible ways to override this path, (environment and sshrc files) but none of them seem to work. Can anyone recommend a way around this problem?
Thanks in advance,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 08:00 AM
01-30-2004 08:00 AM
Re: ssh PATH problem
for the sshd server look for the sshd_conf file and in there is PATH for sshd deamon.
/sbin/init.d/ssh stop; /sbin/init.d/ssh start
for the client, ssh uses your own environment.
do a env and see what your path is.
else please explain your actuall problem
peace
donny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 08:54 AM
01-30-2004 08:54 AM
Re: ssh PATH problem
wincvs uses ssh to run cvs commands on the cvs server. for example, it might send:
ssh -l username hostname cvs -d etc...
This assumes the command cvs is actually in the path. The problem is that when you use ssh in this way you are stuck with the path that defined at compile time. It doesn't source .profile or anything because it is not actually starting a shell. It's kind of like how things run from cron.
The solution I found was to set the CVS_SERVER environment variable to /opt/cvs/bin/cvs on the windows workstation. this changes the above command string to:
ssh -l username hostname /opt/cvs/bin/cvs etc...
This works, but now I have to set this on every users workstation that will be using CVS. A better solution would be to find a way to override the path that was defined at compile time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2004 12:17 AM
02-01-2004 12:17 AM
Re: ssh PATH problem
when sshd invoking remote command, it is not using .profile. Environment
variables like PATH are hardcoded into ssh.
However, sshd can override these defaults using the file ${HOME}/.ssh/environment
on remote machine.
You can allow this behavior editing the
/opt/ssh/etc/sshd_config file
"PermitUserEnvironment yes" (restart sshd).
Beware, environment file is not executed, just scanned. Only accepted records are those like PATH=/usr/bin:/usr/local/bin:/whatever/cvs/bin. No export, no external commands. I had tried out the default PATH first (ssh server "env"), than added the cvs path and enscribed the result to environment file. It works ok. Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2004 01:22 AM
02-01-2004 01:22 AM
Re: ssh PATH problem
It started giving errors, so I kicked up maxusers which kicks up nproc and nfile, reinstalled and the error seems to be gone for now.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2004 03:08 AM
02-02-2004 03:08 AM
Re: ssh PATH problem
Thanks of the suggestion. The only problem I have with doing it that way is that I would have to do it for all users using cvs. I would like to do it in one place to take care of it for everyone.
Thanks,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2004 03:51 AM
02-02-2004 03:51 AM
Re: ssh PATH problem
piggy way just symlink cvs in /usr/bin ;-)
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2004 04:31 AM
02-02-2004 04:31 AM