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. the last line of the authorized_keys file under the ssh directory 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