SFTP to send file with bash script

后端 未结 3 1861
忘掉有多难
忘掉有多难 2021-02-04 04:25

I\'m using key authentication, so password is not an issue. I have a file whose name I know and I simply want to send it to another machine over sftp.

I tried searching

3条回答
  •  情歌与酒
    2021-02-04 05:11

    You said that you are not interested in other tools, but scp is a much better choice for unattended file transfers. Here is an scp example:

    scp test.txt root@remote:/root/dropoff
    

提交回复
热议问题