Я создаю работу в jenkins, в которой мне нужно скопировать папки и файл с сервера jenkins на другой сервер. На сервере есть порт 802 и пароль = "ПАРОЛЬ", как скопировать папку на другой сервер?
sshpass -p'PASSWORD'scp -P 802 $SSH_OPTS -r $WORKSPACE/target/abc.war root@2xx.xx.xxx.xx:/root/war/
Usage: sshpass [-f|-d|-p|-e] [-hV] command parameters
-f filename Take password to use from file
-d number Use number as file descriptor for getting password
-p password Provide password as argument (security unwise)
-e Password is passed as env-var "SSHPASS"
With no parameters - password will be taken from stdin
-P prompt Which string should sshpass search for to detect a password prompt
-v Be verbose about what you're doing
-h Show help (this screen)
-V Print version information
At most one of -f, -d, -p or -e should be used
Build step 'Execute shell' marked build as failure
Finished: FAILURE