How to run the sftp command with a password from Bash script?

后端 未结 9 746
礼貌的吻别
礼貌的吻别 2020-11-22 11:55

I need to transfer a log file to a remote host using sftp from a Linux host. I have been provided credentials for the same from my operations group. However, since I don\'t

9条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 12:29

    Combine sshpass with a locked-down credentials file and, in practice, it's as secure as anything - if you've got root on the box to read the credentials file, all bets are off anyway.

提交回复
热议问题