Re: ssh remote execution: PATH

2006-02-13 Thread nocfed
On 2/13/06, Damien Miller [EMAIL PROTECTED] wrote:
 On Mon, 13 Feb 2006, Peter wrote:

 
  --- Damien Miller [EMAIL PROTECTED] wrote:
 
   On Mon, 13 Feb 2006, Peter wrote:
  
$ ssh [EMAIL PROTECTED] /usr/local/sbin/command
   
The PATH of the user (given in ~/.profile) contains /usr/local/sbin
   but
evidently this file remains unread.
  
   .profile is only used for interactive sessions. Try .kshrc
 
  Ok, so you're saying the user should change shells (from bash) to ksh?

 No, I'm suggesting that, since you are using a non-default shell and since
 you didn't bother to mention it, you read you shell's documentation to find
 the equivalent to .kshrc and use that.

 -d



or, I don't know, you can also read ssh(1) and review ENVIRONMENT as
well as login.conf(5) for the remote system(s).  Maybe also check out
/etc/default/login for some non-openbsd systems as well.  Now we don't
have to worry about what shell is being called, unless of course it
clobbers the PATH variable rather than building upon it.



ssh remote execution: PATH

2006-02-12 Thread Peter
Hi, I on 3.8 invoke ssh in order to run a command on a remote host:

$ ssh [EMAIL PROTECTED] command

The annoyance is that I must specify the absolute path:

$ ssh [EMAIL PROTECTED] /usr/local/sbin/command

The PATH of the user (given in ~/.profile) contains /usr/local/sbin but
evidently this file remains unread.

Is there any way to not have to supply the entire path short of
recompiling ssh?

--
Peter



Re: ssh remote execution: PATH

2006-02-12 Thread Damien Miller
On Mon, 13 Feb 2006, Peter wrote:

 $ ssh [EMAIL PROTECTED] /usr/local/sbin/command
 
 The PATH of the user (given in ~/.profile) contains /usr/local/sbin but
 evidently this file remains unread.

.profile is only used for interactive sessions. Try .kshrc



Re: ssh remote execution: PATH

2006-02-12 Thread Damien Miller
On Mon, 13 Feb 2006, Peter wrote:

 
 --- Damien Miller [EMAIL PROTECTED] wrote:
 
  On Mon, 13 Feb 2006, Peter wrote:
  
   $ ssh [EMAIL PROTECTED] /usr/local/sbin/command
   
   The PATH of the user (given in ~/.profile) contains /usr/local/sbin
  but
   evidently this file remains unread.
  
  .profile is only used for interactive sessions. Try .kshrc
 
 Ok, so you're saying the user should change shells (from bash) to ksh?

No, I'm suggesting that, since you are using a non-default shell and since
you didn't bother to mention it, you read you shell's documentation to find
the equivalent to .kshrc and use that.

-d



Re: ssh remote execution: PATH

2006-02-12 Thread Peter
--- Damien Miller [EMAIL PROTECTED] wrote:

 On Mon, 13 Feb 2006, Peter wrote:
 
  $ ssh [EMAIL PROTECTED] /usr/local/sbin/command
  
  The PATH of the user (given in ~/.profile) contains /usr/local/sbin
 but
  evidently this file remains unread.
 
 .profile is only used for interactive sessions. Try .kshrc

Ok, so you're saying the user should change shells (from bash) to ksh?