bash: scp: command not found lost connection问题解决

在内网,从一台服务器传mysql的源码安装包到另外一台服务器时,发生如下的错误:

[root
@localhost ~]# scp mysql-5.1.55.tar.gz [email protected]:.

[email protected]‘s password:

bash: scp: command not found

lost connection

提示scp的命令找不到,但是查找发现命令是存在的

[root
@localhost ~]# whereis scp

scp: /usr/bin/scp /usr/share/man/man1/scp.1.gz

[root
@localhost ~]# find / -name scp

/usr/bin/scp

是因为没有加入到环境变量的原因?

evn查看,已经加入了环境变量了

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

而且带上全路径,执行的时候还是报相同的错误

[[email protected] ~]# /usr/bin/scp mysql-5.1.55.tar.gz [email protected]:.

[email protected]‘s password:

bash: scp: command not found

lost connection

查看scp所依赖的包

[[email protected] ~]# rpm -qf /usr/bin/scp

openssh-clients-5.3p1-81.el6.i686

怀疑会不会是有其他的依赖包没有安装上,重新安装一遍

[[email protected] ~]# yum install openssh-clients*

Loaded plugins: fastestmirror, security

Loading mirror speeds from cached hostfile

* base: centos.ustc.edu.cn

* epel: mirrors.ustc.edu.cn

* extras: centos.ustc.edu.cn

* updates: centos.ustc.edu.cn

Setting up Install Process

Package openssh-clients-5.3p1-81.el6.i686 already installed and latest version

Nothing to do

提示已经安装了,而且已经是最新的版本了

再测试的时候,还是出现同样的错误。纳尼,如果是命令不存在或者找不到,应该在scp命令敲出来之前就有问题啊,而不应该是成功敲完命令之后再出现这个问题。如果本地都没有问题,那是另一端服务器上没有安装scp的命令?

[[email protected] ~]# whereis scp

scp:

[[email protected] ~]#

果真是如此,所以是server端没有找到scp的命令,而不是本地

安装上scp的依赖包

[[email protected] ~]# yum install openssh-clients*

安装好之后,重新传输文件

[[email protected] ~]# scp mysql-5.1.55.tar.gz [email protected]:.

[email protected]‘s password:

mysql-5.1.55.tar.gz                                                                               100%   23MB   4.5MB/s   00:05

[[email protected] ~]#

ok,搞定

时间: 2024-12-22 04:26:37

bash: scp: command not found lost connection问题解决的相关文章

解决scp时报bash: scp: command not found的错误

在进行scp时报bash: scp: command not found [[email protected] add_admin]# scp ocp_admin_privileges.mysql [email protected]:/root[email protected]'s password: bash: scp: command not foundlost connection 查看本机是否安装openssh-clients软件包 [[email protected] add_admi

Linux bash: scp: command not found的问题记录

1,scp报错 [[email protected] soft]# scpjdk-7u55-linux-x64.tar.gz 192.168.121.246:/soft/ [email protected]'s password: bash: scp: command not found lost connection [[email protected] soft]# 2,调试-v [[email protected] soft]# scp -vjdk-7u55-linux-x64.tar.g

bash: scp: command not found

现在需要远程复制源码包使用scp命令:[[email protected] Downloads]# scp nginx-1.6.2.tar.gz 172.25.16.2:[email protected]'s password:      bash: scp: command not found       //提示错误lost connection//解决方法:[[email protected] Downloads]# which scp/bin/scp[[email protected]

Linux下bash: scp: command not found问题 或者装ssh包时报错 Requires: libedit.so.0()(64bit)

    一.用scp命令从物理主机向CentOS 6.1虚拟机传送文件,提示以下错误:bash: scp: command not found到CentOS 6.1虚拟机查看也缺少scp命令.该虚拟机是同事安装的,还有其他命令也不完整,可能不是完整安装,缺了些包. 二.用以下方法解决: 1.在一台完整的CentOS 5.8查找scp所在的包:# which scp/usr/bin/scp# rpm -qf /usr/bin/scpopenssh-clients-4.3p2-82.el5 2.查出

scp: command not found如何解决

今天给一台新的服务器,准备源码安装一些软件,需要使用scp复制文件时报错如下:-bash: scp: command not found 解决办法如下:安装scp的软件包:# yum install openssh-clients 本以为安装完毕就可以了,在执行scp 后又报错如下:[[email protected] ~]# scp ./mysql-5.5.28.tar.gz  [email protected]:/root[email protected]'s password: bash:

scp出现ssh port 22: Connection refused 问题解决具体步骤

[root(0)@sys11 09:20:29 /home/work/Code_release/bj]# scp ./release.sh  [email protected]:/Users/a2014102/Downloadsssh: connect to host 192.168.161.151 port 22: Connection refusedlost connection Solution: One possible reason is that because the ssh se

centos解决bash: telnet: command not found...&& telnet: connect to address 127.0.0.1: Connection refused拒绝连接

检查telnet是否已安装: [[email protected] src]# rpm -q telnet-serverpackage telnet-server is not installed[[email protected] src]# telnet 192.168.81.129bash: telnet: command not found... rpm -qa |grep telnet 没有则安装,有跳过 yum install telnet-server -y && yum i

bash: ifconfig: command not found 问题解决

ifconfig使用出现问题了?竟然提示找不到~~于是百度~~ [[email protected] /]$ ifconfig 提示:“bash: ifconfig: command not found” 切换到root用户下 [[email protected] /]$ ifconfig 依然提示:“bash: ifconfig: command not found” 分析问题 1.whereis ifconfig 看一下这个命令在哪个目录下 2.echo $PATH 看一下该目录是否在路经下

MySQL问题解决:-bash:mysql:command not found

问题: [[email protected] /]# mysql -uroot -p -bash: mysql: command not found www.2cto.com 因为mysql命令的路径在/usr/local/mysql/bin下面,所以你直接使用mysql命令时,系统在/usr/bin下面查此命令,所以找不到了 解决办法是: ln -s /usr/local/mysql/bin/mysql /usr/bin 做个链接即可