aix_ssh scp command not found

wangzhensheng發表於2009-01-07

vi /etc/environment

PATH=/usr/local/bin:$PATH

[@more@]

> scp: Command not found.
> lost connection

Add /usr/local/bin to the end of the line containing 'PATH' in
/etc/environment on the AIX box. No further action needed -- it will work
on the next scp attempt.

/etc/environment (on an AIX machine) always gets executed, even for
non-interactive logins, so if /usr/local/bin is listed in PATH there, scp
will work correctly.

It is best to make sure /usr/local/bin is listed at the *end* of the PATH
definition or you may run into some seriously weird stuff in very specific
and unique situations (as we did, once or twice).


In that case, it was running GNU awk rather than AIX awk, which broke SMIT
in very interesting ways for a specific SMIT menu screen. Rearranging PATH
to use /usr/local/bin *last* made everything work again and preserved other
functionality such as ssh/scp.
============================
bash: scp: command not found

Hi Arnab,

I assume you are trying to scp to an AIX server? If so, then do:

# vi /etc/environment

(or use your favorite text editor -- nano, pico, emacs, etc.)

and add one line at the end of that file:

PATH=/usr/local/bin:$PATH

Then retry the scp command.

I am not sure about the tcgetattr error; that is a strange one, but the
environment modification will help with the 'scp: command not found'
error.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8806316/viewspace-1015860/,如需轉載,請註明出處,否則將追究法律責任。

相關文章