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? View the Go SCP command to set up 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.
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.