Operating System - HP-UX
1821245 Members
2877 Online
109632 Solutions
New Discussion юеВ

ksh: scp not found error message

 
Valery Kolander
Advisor

ksh: scp not found error message

scp -p /tmp/junk server2:/tmp/test
ksh: scp: not found
lost connection

I know this error comes from the receiving server, but I am not sure what the problem is. I have checked permissions, and PATH variable. Anyone have suggestions?
5 REPLIES 5
James Beamish-White
Trusted Contributor

Re: ksh: scp not found error message

Can you run 'which scp' and get a result? If not, then it is your path.

The lost connection bit makes me wonder - can you sftp as well? Trying may help in troubleshooting, maybe your sftp subsystem needs to be set up properly.

Can you ping server2? Does your user exist on both systems?

Cheers!
James
GARDENOFEDEN> create light
James Beamish-White
Trusted Contributor

Re: ksh: scp not found error message

Or it may be that your remote host cannot find scp - try

ssh server2
echo $PATH

... and make sure the path you get includes the scp command on the *remote* host. You may need to change your environment variables on the remote server.

Cheers!
James
GARDENOFEDEN> create light
Valery Kolander
Advisor

Re: ksh: scp not found error message

I have already tried your suggestions, I guess I wasn't clear in my first message. But, thanks for trying. I ended up installing ssh again, and resetting everything up. It is working. Thanks again.
Steve Bonds
Trusted Contributor

Re: ksh: scp not found error message

"scp" is kind of annoying in that it must be present on the remote system in its own compiled-in PATH, not the PATH that gets set on the system. Generally this means it needs to be in /bin or /usr/bin.

I just create a symlink there from its real location.
Maarten van Rossen
Occasional Advisor

Re: ksh: scp not found error message

You can also create the .ssh/enviroment file and define the path in this file
Our you also change the source of ssh and recompile

(You will have to change the "USER_PATH" in the "config.h" file)