Discussion Locked

Can't get system to "find" scp command

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello, I am trying to run scp (secure copy) command. I keep getting "ksh: scp: not found" error. I get this even when I run the command from the directory that scp (and ssh) are in. I also get it when my command includes the full path to the scp command. Any help would be greatly appreciated. Thanks, Jeff

Here is what I ran:

userID(server1: /fisc/gnu/bin): /fisc/gnu/bin/scp -p /home/userID/test.txt userID@server2:/home/userID/test.txt

And this is what was returned:

ksh: scp: not found
lost connection

Any help on why it is not found would be greatly appreciated. Thanks, Jeff

7 replies

by gary_w

Make sure the directory scp is in is in your PATH environment variable.

echo $PATH

add a "./" in front of the command to force the shell to look in the current directory.

Gary

by hson

I would say that the problem you are having is due to the fact that when your scp connect to the remote machine it cant find the scp binary (on the remote machine). Have you checked your path ($PATH) on the remote machine? Just log on to the machineand check if you can find scp in any of the directories in your path, if not, find out where scp is and add it to your path. Don't forget to add it to your startup files (.cshrc for csh/tcsh .profile for sh/ksh)

This discussion is closed to new replies.