How to copy file from SSH remote host to Jenkins Server

后端 未结 3 686
长发绾君心
长发绾君心 2020-12-10 02:42

We are using Jenkins server for our daily build process and executes some bash scripts on remote hosts over SSH. This scripts are generating html log files on remote hosts.<

3条回答
  •  轮回少年
    2020-12-10 03:08

    use sshpass command to send file in

    Build Environment -> Execute Shell script on remote host using ssh -> Post build script

    sample command :

    sshpass -p "password" scp path/of/file :/path/of/file
    

    This will skip password prompt for scp command and will provide password to scp.

提交回复
热议问题