在我们环境中,主机会不定期修改密码会造成使用用户密码配置在jenkins中的服务器列表受影响 Publish over SSH 将私钥配置文件填写path to key中
将公钥传输至主机
1 2 3 4 5 6 7 8 9 10 11 12 13
root@29ac875d3921:~# ssh-copy-id -i .ssh/id_rsa.pub root@10.1.74.24 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub" The authenticity of host '10.1.74.24 (10.1.74.24)' can't be established. ECDSA key fingerprint is SHA256:HSul9NKf1pJAugF27JZp+lotF/8wdA3z3imMFPnI/uk. Are you sure you want to continueconnecting (yes/no/[fingerprint])? yes /usr/bin/ssh-copy-id: INFO: attempting to log inwith the newkey(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@10.1.74.24's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'root@10.1.74.24'" and check to make sure that only the key(s) you wanted were added.