The following section describes the scripts used after automatic Jenkins Compilation: add to Build-> Execute Shell, [plain] sshpass-p pwd ssh-t root@192.168.1.55 'service my_web stop' sshpass-p pwd scp bin/my_web root@192.168.1.55: /home/dist/web/sshpass-p pwd ssh-t root@192.168.1.55 'service my_web start' & that's it. The remote machine is also Ubuntu, IP: 192.168.1.55, And the/etc/init. d/my_web script has been set, and it is agreed to copy the program to the/home/dist/web directory. The password is also set. Install sshpass on the Jenkins machine, and first try it. Press yes. Sshpass can pass the password. The-t parameter is used to simulate keyboard input. This script ends with &; otherwise Jenkins build will be suspended. This is a simple method. If more information needs to be controlled during deployment, a dedicated web server should be deployed like Google. The program only needs to upload the binary program to be deployed and the configuration.