The SCP command sets a password-less job on jenkins today, You need to copy the file to a remote machine and think of the frequently used scp command. However, this command is convenient, but requires a password. How can I use this command in the script? There are many solutions to view Google, one of which is to establish secure communication between two hosts through the key. The process is as follows: the Linux code ssh-keygen-t rsa is the same as the process of generating the key when using Git. You need to upload the generated public key to the target machine. In this case ~ A. ssh directory is generated under the directory. Check that there are three files under the file: Linux code id_rsa id_rsa.pub known_hosts. They are private keys, public keys, and known hosts. Use the scp command to copy the public key to the remote host and change the file name to authorized_keys Java code scp id_rsa.pub root @ remote_ip :~ /. Ssh/authorized_keys is OK. You do not need to enter the password when using the scp command to copy the file to the remote end.