ITPub博客

首页 > Linux操作系统 > Linux操作系统 > aix_ssh scp command not found

aix_ssh scp command not found

原创 Linux操作系统 作者:wangzhensheng 时间:2009-01-07 20:38:50 0 删除 编辑

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/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: aix_system_monitor
请登录后发表评论 登录
全部评论

注册时间:2013-01-02

  • 博文量
    137
  • 访问量
    260335