The first problem with updating the local code to the server's shell script using Ubuntu as the development machine OS is to put the updated code on the test server before running www.2cto.com on windows, the Winscp is used to update the code there is no program similar to Winscp in ubuntu on the server, you can only write a simple script to do this. The Shell code www.2cto.com # The file array to be updated is relative to the root directory path file_array = ("xxx/xxxxx. py "\" xxx/xxxxx. py ") # My sub-project root directory my_dir ="/home/xxx/workspace/xxx/"# development machine project root directory net_dir =" xxx@192.168.1.xxx: /usr/local/xxx/"length =$ {# file_array [@]} echo $ {length} for (I = 0; I <$ {length }; I ++ )); do scp $ {my_dir }$ {file_array [$ I] }$ {net_dir }$ {file_array [$ I]} done is actually a simple loop to execute the scp command. you may need to enter the server password again to execute: shell code ssh-keygen-t rsa in the user's main directory /. generate a pair of key id_rsa Private Key id_rsa.pub Public Key under the ssh directory to copy the public key to the remote host, and write the authorization list file Shell code touch/root /. ssh/authorized_keys cat/root /. ssh/id_rsa.pub>/root /. ssh/authorized_keys is actually copying the content in id_rsa.pub to authorized_keys.