1836937 Members
2295 Online
110111 Solutions
New Discussion

openssh shell problems

 
Dirk Fieremans
Advisor

openssh shell problems

I just installed OpenSSH 3.1 on HP-UX 11 and get the following error when connecting from another host:
#ssh -l date
ksh: date: not found

anybody knows how to fix?

Dirk

8 REPLIES 8
Steve Steel
Honored Contributor

Re: openssh shell problems

Hi


You need to set up the PATH on the remote machine so it knows where to look for date.


Try
1)With full path name.

2)Do a remote echo \$PATH
See what is set

Fix it in the /etc/profile


NOTE.On secure shell a full search path is not
always good

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
harry d brown jr
Honored Contributor

Re: openssh shell problems

Dirk,

You should ALWAYS use the FULLY QUALIFIED path when executing commands in scripts and on remote machines.

try using /sbin/date for "date"

live free or die
harry
Live Free or Die
Dirk Fieremans
Advisor

Re: openssh shell problems

it's weird because with OpenSSH 2.5.1 it worked just fine.
if you do:
#ssh -l
@# date
Mon Apr 8 13:24:19 BST 2002

then it works fine!!
I really think I must have forgotten a PATH or something which is only read by SSH?
Maybe a config file?

Dirk
Dirk Fieremans
Advisor

Re: openssh shell problems

I get the following response:
#ssh -l echo \$PATH
/opt/openssh2/bin

That doesn't look good :)
Now where can I change it?

Dirk
harry d brown jr
Honored Contributor

Re: openssh shell problems

Modify the path variable in your /etc/init.d/sshd file on your "remote" host.


live free or die
harry
Live Free or Die
Dirk Fieremans
Advisor

Re: openssh shell problems

taht one seems to be fine as well:
PATH=/usr/sbin:/usr/bin:/sbin:/opt/openssh2/sbin:/opt/openssh2/bin
export PATH

There are quite a few changes between OpenSSH 2.5.1 and 3.1
Maybe I need to chnage the sshd_config, but I don't see any useful reference...

Dirk
harry d brown jr
Honored Contributor

Re: openssh shell problems

You might need to rebuild openssh:


3.7 - "scp: command not found" errors
scp(1) must be in the default PATH on both the client and the server. You may need to use the --with-default-path option to specify a custom path to search on the server. This option replaces the default path, so you need to specify all the current directories on your path as well as where you have installed scp. For example:

$ ./configure --with-default-path=/bin:/usr/bin:/usr/local/bin:/path/to/scp


http://www.openssh.com/faq.html

If you need to rebuild, Kevin Steves (the author of building an HP bastion host), has this on building openssh:

http://www.atomicgears.com/papers/osshhpux.html


live free or die
harry
Live Free or Die
Dirk Fieremans
Advisor

Re: openssh shell problems

Damned, I used the package at http://hpux.tn.tudelft.nl/hppd/hpux/Networking/Admin/openssh-3.1p1/

I hoped not to have to compile it myself, because I always get in trouble with installations on workstations, servers, 64bit and 32bit...

Dirk