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博客 ” ,链接:https://blog.itpub.net/8806316/viewspace-1015860/ ,如需转载,请注明出处,否则将追究法律责任。