Redhat hit Sh-copy-id command error:-bash:ssh-copy-id:command not found

Source: Internet
Author: User
Tags ssh access

Redhat hit Sh-copy-id command error:-bash:ssh-copy-id:command not found

SSH access to multiple Linux servers without a password,

Which enters a Linus, copies it to host, appears

Will not be the user's permissions issue, under Root execution:

[Email protected] hadoop]# Ssh-copy-id
/usr/bin/ssh-copy-id:error:no identities found

Why does it appear like this? (At present, I have not resolved, if you know the reason for hope to tell you!) )

After a long day, I got a few options:

1. Perform the following to remove the problem of minimizing the installation.

Yum-y Install Openssh-clients

Results:

[email protected]. 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

[email protected]. ssh]# exit
Exit
[email protected]. ssh]$ Sh-copy-id
Bash:sh-copy-id:command not found

It's still not working.

2 Another method was found, namely:

1. If the Ssh-copy-id function does not exist on the remote server, as follows

[email protected]. ssh]# ssh-copy-id-i id_rsa.pub [email protected]

-bash:ssh-copy-id:command not found

Can try to use the command to solve, directly copy the local PubKey content to the remote server;

The following is performed in host2 or Host6

Cat ~/.ssh/id_*.pub | SSH [email protected] ' cat >> Ssh/authorized_keys '

It can be both.

Reproduced in: Multiple Linux servers ssh mutual access without password: http://kling.blog.51cto.com/3320545/1132800

Redhat hit Sh-copy-id command error:-bash:ssh-copy-id:command not found

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.