Establish A trust relationship between Linux hosts between host A and host B, so that host A can log on to host B 1.a without A password and execute www.2cto. comssh-keygen-trsa-b1024 (ssh-keygen-tdsa-b1024 can also be used) main object... establish trust relationships between Linux hosts and between host A and host B, enable host A to log on to host B1. host A without A password and execute www.2cto.com ssh-keygen-t rsa-B 1024 (you can also use ssh-keygen-t dsa-B 1024) generate in the main directory. ssh directory 2. enter. ssh directory 3. execute cat id_rsa.pub to display the result copy (you can also use cat id_dsa.pub, which is usually ready for use) 4. on host B, go to. ssh (if not, execute ssh-keygen to generate) 5. paste the copied result to host B. au under the ssh Directory The last line of the thorized_keys File 6. the trust relationship is established. when you execute ssh user @ B on host A for the first time, you will be prompted to select "yes" and press enter (or do not enter "yes" or press enter directly ???? Forgot, see "Supplement"). The user password is not required. the logon is successful! Www.2cto.com: if the trust relationship is still not established, check whether the corresponding user is in the/home path. ssh directory and its file permissions. this permission cannot be too large. you can set work to 755 (for example, chmod 755 work. for ssh directory and file permissions, see servers with normal trust relationships. the ssh directory may contain the config and known_hosts files. The config file is the default user name used to configure local ssh remote logon, as configured in local config: host A User work the local execution of ssh A is equivalent to executing the ssh work @ A known_hosts file to record hosts with known trust relationships, after the trust relationship is established, you need to manually execute a confirmation for the first login with the trust relationship. this confirmation will add the trust relationship of the local host to the know_hosts of the remote host, user intervention is no longer required for the next login with a trust relationship. Establish the trust relationship between multiple hosts A and multiple hosts B in batches. 1. first, establish A trust relationship between A and all B. 2. the trust of the synchronously built A is related to other A that have not yet established A trust relationship
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