The ssh function of the two machines is used to enable the ssh function of the two machines. You do not need to enter the password each time you log on to the server. for multiple servers, this is a prerequisite for www.2cto.com: ssh must be installed on the machine. For detailed installation instructions, refer to (1 ). generate the Public Key cd ~ on the local machine ~ Ssh-keygen-t dsa Note: 1. ssh-keygen is an overall command, bad case: ssh-keygen 2. enter passphrase (empty for no passphrase) as prompted. enter to skip this step. -t is the key type. Currently, dsa and rsa www.2cto.com are commonly used to publish the Local Public Key to the destination scp ~ /. Ssh/id_dsa.pub user @ target-machine :~ /. Ssh/source-machine-key: cat the public key on the target machine to authorized_keys chmod 755 ~ /. Ssh chmod 644 ~ /. Ssh/authorized_keys