From owner-ssh@clinet.fi  Fri May 18 14:30:03 2001
Received: from smtp1.clinet.fi (smtp1.clinet.fi [194.100.2.57])
	by hutcs.cs.hut.fi (8.9.3/8.9.3) with ESMTP id OAA16209
	for <ssh-archiver@cs.hut.fi>; Fri, 18 May 2001 14:30:02 +0300 (EET DST)
Received: from mail.clinet.fi (mail.clinet.fi [194.100.0.7])
	by smtp1.clinet.fi (Postfix) with ESMTP
	id 22C5E20472; Fri, 18 May 2001 14:29:52 +0300 (EEST)
Received: (from majordom@localhost)
	by mail.clinet.fi (8.9.3/8.9.3) id OAA11184
	for ssh-outgoing; Fri, 18 May 2001 14:04:57 +0300
Received: from shepster.int.bmcomp.com (bmcomp.com [204.210.43.235])
	by mail.clinet.fi (8.9.3/8.9.3) with ESMTP id OAA11144
	for <ssh@clinet.fi>; Fri, 18 May 2001 14:04:51 +0300
Received: from shepster.int.bmcomp.com (bmcomp.com [204.210.43.235])
	by shepster.int.bmcomp.com (8.9.3+Sun/8.9.3) with SMTP id EAA26225;
	Fri, 18 May 2001 04:04:41 -0700 (PDT)
Message-Id: <200105181104.EAA26225@shepster.int.bmcomp.com>
Date: Fri, 18 May 2001 04:04:41 -0700 (PDT)
From: David Knight French <dkf@bmcomp.com>
Reply-To: David Knight French <dkf@bmcomp.com>
Subject: RE: problem with scp
To: Gerard.Glas@nob.nl, cnobile@appliedtheory.com
Cc: ssh@clinet.fi
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: WdWHjmf1CDQFFD4DvRgKUw==
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4.2 SunOS 5.8 i86pc i386 
Sender: owner-ssh@clinet.fi
Precedence: bulk

If none of this works, put the following in .ssh/environment (or 
.ssh2/environment) on the remote host:

PATH=/usr/local/bin:/usr/bin:/bin

Of course PATH would be what you need to find scp.  My guess is that scp is in 
/usr/local/bin.  This is probably in your login scripts like .profile or 
/etc/profile.  The problem is, scp uses ssh in non-login mode, thus the shell is 
not a login shell and the path is not set properly.  The environment file solves 
this for you by making sure the PATH is set properly in these cases.  

To test my hypothesis, before creating the PATH entry in the environment file 
run:

	ssh remote_scp_host 'echo $PATH'
	
You will probably just see a very basic PATH without the dir that scp resides 
in.  Now create the environment file with a PATH entry and do it again.

OTOH, if you are running a shell like csh or bash that have individual command 
files per invocation, e.g. .cshrc or .bashrc, look in there and make sure the 
PATH is being set properly and not being reset to something minimal.  The above 
ssh ... above will help you track it down.

Hope this helps.

	--Dave

>X-Priority: 3 (Normal)
>Content-Transfer-Encoding: 8bit
>MIME-Version: 1.0
>Date: Thu, 17 May 2001 10:53:58 -0400 (EDT)
>From: "Carl J. Nobile" <cnobile@appliedtheory.com>
>To: Gerard Glas <Gerard.Glas@nob.nl>
>Subject: RE: problem with scp
>Cc: "ssh@clinet.fi" <ssh@clinet.fi>
>
>Hi Gerard,
>
>Are you sure that the path to scp is in your PATH env var? Also if you
>are running a GUI then log out and back in again, depending on how the
>desktop is configured it might use a VC which will export it PATH env to
>all subsequent xterms, so you have to logout and maybe restart X also.
>Every time I've had this problem it been one or the other of these
>problems.
>
>Carl
>
>On 17-May-01 Gerard Glas wrote:
>> I try to do the following:
>> 
>> dexter:24% scp /tmp/test obelix:/tmp
>> gerard@obelix's password:
>> sh: scp: not found
>> lost connection
>> dexter:25%
>> 
>> Why I get always sh: scp: not found.
>> 
>> I did already a ./configure --with-default-path=/.....
>> no result.
>> Does anybody know?
>
>------------------------------------------------------------------------
>E-Mail: Carl J. Nobile <cnobile@appliedtheory.com>
>Date: 17-May-01                             Phone: 315-453-2912 Ex. 5336
>Time: 10:50:12                                Fax: 315-479-0859
>
>Software Engineering Group -- AppliedTheory Corp.
>224 Harrison Street, 6th Floor, Syracuse, NY  13202
>------------------------------------------------------------------------

--
David Knight French                           
Black Mountain Computer Consulting
Voice: (858)279-4862
Email: dkf@bmcomp.com

