RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found

在多台Linux服务器SSH相互访问无需密码,

其中进入一台Linus中,对其进行拷贝一下到host中,出现

会不会是用户的权限问题,在root下执行:

[root@host6 hadoop]# ssh-copy-id
/usr/bin/ssh-copy-id: ERROR: No identities found

为啥出现这个样子? (目前我也没有解决,若您知道其原因望告知一下!)

查了半天,我得到一下几个方案:

1.执行下面,去掉最小化安装的问题.

   yum -y install openssh-clients

结果:

[root@host6 .ssh]# yum -y install openssh-clients
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Nothing to do

[root@host6 .ssh]# exit
exit
[hadoop@host6 .ssh]$ sh-copy-id
bash: sh-copy-id: command not found

还是不行.

2 找到了另外一个方法,即:

1、如果ssh-copy-id 函数在远程服务器不存在;如下

[root@kt02 .ssh]# ssh-copy-id -i  id_rsa.pub hadoop@host
-bash: ssh-copy-id: command not found

可以尝试用一下命令解决,直接复制本地的pubkey内容到远程服务器;

即到host2或者host6中执行以下

cat ~/.ssh/id_*.pub | ssh  hadoop@host2 'cat >> .ssh/authorized_keys'

既可以了。

转载于:多台Linux服务器SSH相互访问无需密码:http://kling.blog.51cto.com/3320545/1132800

RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found的更多相关文章

  1. scp命令报错-bash: scp: command not found

    # scp -bash: scp: command not found # which scp /usr/bin/scp # rpm -qf /usr/bin/scp openssh-clients- ...

  2. Linux pip命令报错 -bash: pip: command not found

    下载 $ wget https://bootstrap.pypa.io/get-pip.py 安装 $ python get-pip.py 查看版本 $ pip -V 查看安装路径: find / - ...

  3. windows下使用GNU make命令报错的解决方法

    windows下使用GNU make命令报错的解决方法=> 错误信息:make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x ...

  4. 启动 ./spark-shell 命令报错

    当使用./spark-shell 命令报错 Caused by: ERROR XJ040: Failed to start database @476fde05, see the next excep ...

  5. source /etc/profile报错-bash: id:command is not found

    由于误操作导致 source /etc/profile 报错 -bash: id:command is not found 此时,linux下很多命令到不能能用,包括vi ls 等... 可以使用 e ...

  6. CURL命令报错:dyld: lazy symbol binding failed: Symbol not found: _SSL_load_error_strings解决办法

    Mac OS X 10.11.6, curl 命令报错,错误如下: dyld: lazy symbol binding failed: Symbol not found: _SSL_load_erro ...

  7. 执行Spark运行在yarn上的命令报错 spark-shell --master yarn-client

    1.执行Spark运行在yarn上的命令报错 spark-shell --master yarn-client,错误如下所示: // :: ERROR SparkContext: Error init ...

  8. Python3安装Celery模块后执行Celery命令报错

    1 Python3安装Celery模块后执行Celery命令报错 pip3 install celery # 安装正常,但是执行celery 命令的时候提示没有_ssl模块什么的 手动在Python解 ...

  9. 解决Homestead yarn , npm run dev, 命令报错问题!

    解决Homestead yarn , npm run dev, 命令报错问题! 2018年06月01日 11:50:51 偶尔发发颠 阅读数:1654    版权声明:本文为博主原创,未经博主同意,不 ...

随机推荐

  1. UvaLive 5026 Building Roads

    传送门 Time Limit: 3000MS Description There is a magic planet in the space. There is a magical country ...

  2. Notions of Flow Networks and Flows

    这篇随笔是对算法导论(Introduction to Algorithms, 3rd. Ed.)第26章 Maximum Flow的摘录. ------------------------------ ...

  3. Android实现控件动画效果

    MainActivity.java public class MainActivity extends AppCompatActivity { private ImageView iv; privat ...

  4. The Dirichlet Distribution 狄利克雷分布 (PRML 2.2.1)

    The Dirichlet Distribution 狄利克雷分布 (PRML 2.2.1) Dirichlet分布可以看做是分布之上的分布.如何理解这句话,我们可以先举个例子:假设我们有一个骰子,其 ...

  5. memcache的内存回收机制

    memcache不会释放内存,而是重新利用. 在缓存的清除方面,memcache是不释放已分配内存.当已分配的内存所在的记录失效后,这段以往的内存空间,memcache只会重复利用. memcache ...

  6. Spring依赖注入:注解注入总结

    更多11   spring   依赖注入   注解   java 注解注入顾名思义就是通过注解来实现注入,Spring和注入相关的常见注解有Autowired.Resource.Qualifier.S ...

  7. linux:SUID、SGID详解

    linux:SUID.SGID详解 文章转载至:http://tech.ccidnet.com/art/2583/20071030/1258885_1.html 如果你对SUID.SGID仍有迷惑可以 ...

  8. Ubuntu无法关机解决办法

    说明:如果不成功请参考一下文章最后的内容,也许会有帮助. 其实不止在ubuntu里面,fedora里面我也遇到了这个问题,就是电脑可以重启,但是不能直接关机,否则就一直停在关机界面,需手动关机.郁闷很 ...

  9. HDU 4883 TIANKENG’s restaurant

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4883 解题报告:一家餐馆一天中有n波客人来吃饭,第 i 波  k 客人到达的时间是 s ,离开时的时间 ...

  10. [Effective JavaScript 笔记]第50条:迭代方法优于循环

    "懒"程序员才是好程序员.复制和粘贴样板代码,一但代码有错误,或代码功能修改,那么程序在修改的时候,程序员需要找到所有相同功能的代码一处处进行修改.这会使人重复发明轮子,而且在别人 ...