8月 292013
使用SCP命令从远端服务器复制文件到本地时的错误提示
[root@localhost ~]# scp root@101.78.100.200:~/webbench ./ root@101.78.100.200's password: bash: scp: command not found [root@localhost ~]#
查看本地是否安装openssh-clients软件包
[root@localhost ~]# yum install openssh-clients Loaded plugins: fastestmirror, presto Loading mirror speeds from cached hostfile * base: mirrors.hust.edu.cn * extras: mirrors.hust.edu.cn * updates: mirrors.hust.edu.cn Setting up Install Process Package openssh-clients-5.3p1-84.1.el6.x86_64 already installed and latest version Nothing to do [root@localhost ~]#
查看远端服务器是否安装openssh-clients软件包并执行安装
[root@monitor ~]# rpm -q openssh-clients package openssh-clients is not installed [root@monitor ~]# [root@monitor ~]# yum install openssh-clients
命令执行成功
[root@localhost ~]# scp root@101.78.100.200:~/webbench ./ root@101.78.100.200's password: webbench 100% 24KB 23.9KB/s 00:00 [root@localhost ~]#
查看安装包路径与文件
[root@monitor ~]# rpm -lq openssh-clients /etc/ssh/ssh_config /usr/bin/.ssh.hmac /usr/bin/scp /usr/bin/sftp /usr/bin/slogin /usr/bin/ssh /usr/bin/ssh-add /usr/bin/ssh-agent /usr/bin/ssh-copy-id /usr/bin/ssh-keyscan /usr/share/man/man1/scp.1.gz /usr/share/man/man1/sftp.1.gz /usr/share/man/man1/slogin.1.gz /usr/share/man/man1/ssh-add.1.gz /usr/share/man/man1/ssh-agent.1.gz /usr/share/man/man1/ssh-copy-id.1.gz /usr/share/man/man1/ssh-keyscan.1.gz /usr/share/man/man1/ssh.1.gz /usr/share/man/man5/ssh_config.5.gz [root@monitor ~]#