Operating System - HP-UX
1825659 Members
3664 Online
109686 Solutions
New Discussion

Can't get system to "find" scp command

 
Marco Paganini
Respected Contributor

Re: Can't get system to "find" scp command

Hello Jeff,

The first thing to do is to run 'file scp' on your scp and see what it tells you. I've seen this situation happening in the following cases:

1) A script with the incorrect shell in the first line (like #!/bin/something)

(that does not seem to be your case since scp should be an executable)

2) A script with CR+LFs in it (again, doesn't seem to be your case)

3) A binary built for the incorrect architecture ("file" will tell you)

4) A script with the same name coming first in the path, and this script suffers from 1 or 2 above (make 'type scp' and make sure the filename it gives you is the right one)

5) An "alias" pointing you to something other than the original (type "alias" and see if there's something aliasing scp to something else).

Hope it helps,
Paga
Keeping alive, until I die.
Jeff Daigle
Advisor

Re: Can't get system to "find" scp command

Thank you all for all the useful help! I followed a lot of your replies. I ended up putting the path to the scp command in /.ssh/environment file. Once I did this, scp worked. Thank you all for the help.
Jeff