- 论坛徽章:
- 0
|
solaris ssh: scp: not found ?
问题解决,参考了以下文件
If none of this works, put the following in .ssh/environment (or
.ssh2/environment) on the remote host:
PATH=/usr/local/bin:/usr/bin:/bin
Of course PATH would be what you need to find scp. My guess is that scp is in
/usr/local/bin. This is probably in your login scripts like .profile or
/etc/profile. The problem is, scp uses ssh in non-login mode, thus the shell is
not a login shell and the path is not set properly. The environment file solves
this for you by making sure the PATH is set properly in these cases.
To test my hypothesis, before creating the PATH entry in the environment file
run:
ssh remote_scp_host 'echo $PATH'
You will probably just see a very basic PATH without the dir that scp resides
in. Now create the environment file with a PATH entry and do it again.
OTOH, if you are running a shell like csh or bash that have individual command
files per invocation, e.g. .cshrc or .bashrc, look in there and make sure the
PATH is being set properly and not being reset to something minimal. The above
ssh ... above will help you track it down. |
|