Scp – Command not found
June 4, 2012 1 Comment
If you are running into the error “scp-command-not-found” while trying to copy a file to another linux machine, there is one of two problems.
1. scp is not installed : This is the least likely, but it is good to rule out all the simple things first. You can tell if scp is installed by entering the command without any parameters.
If you get something like this, then all is well, move on to step 2.
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 … [[user@]host2:]file2
2. Openssh is only partially installed. There are 2 parts to openssh, the server and the client. Run this command on both machines as root. This will allow both computers to connect outbound via ssh and receive inbound connections.
Debian / Ubuntu
More than likely, the client was not installed on the machine accepting the connection .
3. Your path is misconfigured If this is the case, then other commands wont work like ‘ls’ or ‘whoami’. Usually a reboot will fix this.
If none of these resolve your issue, the problem is much more severe. You should probably uninstall openssh client and server, reboot and reinstall.