Scp – Command not found

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.

Redhat / Fedora


yum install openssh-server openssh-clients

Debian / Ubuntu



apt-get install openssh-server openssh-clients

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.

Advertisements

About spuder
spuder is a "super computer" support engineer by day, and tinkerer / hobbyist by night.

One Response to Scp – Command not found

  1. Pingback: Today's Linux Server LinksNine OM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: