I want to use the scp command to copy a local file to a remote server, but I get an error after entering the user password on the remote server.
~]$ scp gitadmin.pub git@123.150.207.18: git@123.150.207.18 password: bash: scp: command not found lost connection
I checked the server using the git user, and it seems that the scp command can be found, and openssh-clinets were also installed.
git@... ~]$ scp usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 git@... ~]$ su root ...... root@... ~]
I am confused about the situation. I didn’t have any configuration on the server? (We use RHEL6 as a server.)
This is my mistake in setting the path. I added 'custom.sh' to /etc/profile.d and added the following lines in it to add the / usr / local / node / bin directory to PATH.
export PATH="/usr/local/node/bin:$PATH"
But the format is wrong. I removed the pair "" and now it works fine. It should be:
export PATH=$PATH:/usr/local/node/bin
Probe Error ... ^ _ ^
scp rhel openssh
Rivers Yang Jun 16 '13 at 7:15 2013-06-16 07:15
source share