How to solve an "scp: not found" issue under AIX

Come on, of course SSH and SCP are absolutely essential tools under UNIX! Telnet and FTP are evil protocols that should be chased and removed from your network as soon as possible.

Except, of course, that scp sometimes does not work. Here is an example:

$ scp support-2.3.tar surfer@galactus:
The authenticity of host 'galactus (' can't be established.
RSA key fingerprint is 02:36:fb:bd:ef:9b:de:ad:be:ef:ea:db:57:f0:1f:fb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'galactus,' (RSA) to the list of known hosts.
surfer@galactus's password:
ksh: scp: not found.
lost connection

Oooops. Before re-installing FTP on your AIX machine, you should check the default $PATH of the server... It can explain a lot of things.

In the example shown above, galactus has the scp binary installed, but it is contained in the /usr/local/bin directory... And that directory is not in the default $PATH.

That environment variable is defined in the file named /etc/environment:

# grep -i path /etc/environment
# If /usr/ucb is at the beginning of the PATH the BSD version of commands will

In the example shown above /usr/local/bin has been added to $PATH... And scp now works!

See Also: