bash: scp: command not found
SysProg - Nathan Paul Simons
enigma at nmt.edu
Thu Feb 3 07:15:45 EST 2000
-----BEGIN PGP SIGNED MESSAGE-----
On Wed, 2 Feb 2000, Harald Hannelius wrote:
>
> How come I can't get scp to work properly. It just complains like this:
>
> scp foo host:
> bash: scp: command not found
> lost connection
i ran into this problem when i installed ssh in /usr/local/bin
on our network. Apparently bash doesn't have /usr/local/bin in it's
compiled in path, and it doesn't source /etc/profile. According to the
bash man page:
"When an interactive shell that is not a login shell is
started, bash reads and executes commands from ~/.bashrc,
if that file exists."
Apparently, scp is considered a non-login interactive shell that invokes
bash. A couple of solutions:
1. Make each user add /usr/local/bin (or wherever scp is) to their path in
their ~/.bashrc
2. Recompile bash to have /usr/local/bin (or wherever scp is) in the
default path.
3. Add an option to ssh to pass a path to the shell (i've seen this in
commercial ssh-1.2.27 as --with-path). And then recompile it.
4. Put scp and ssh somewhere in bash's default path (which from my
experience appears to be /usr/bin:/bin:/usr/sbin:/sbin).
Systems Programmer - Nathan Paul Simons
http://www.nmt.edu/~enigma Speare 20 x5748
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQCVAwUBOJiQdIagi6ObDYzdAQFhVgP8Cp/Liqg7uAWemKZTsfx4prn6suERDTTd
7hphgIebuDpy5HsRbBQlE7wPzkvgwr8KA6sgfmgTp2XPkKzkJIvt+KJKzrwwMp62
7PWOb0mAchx6LK8MT6n2JNv0Ovvn2HlumOY1XyV1XvB3Z/Lq1+uWYz0rxfC+OWYz
+BzT4BmjsBM=
=8iY9
-----END PGP SIGNATURE-----
More information about the openssh-unix-dev
mailing list