rbucmd: use user@host everywhere

This commit is contained in:
Lucas 2022-01-16 14:23:14 +00:00
parent 71019bf806
commit 13fae1631f

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# env # env
# Written in 2021 by Lucas # Written in 2021-2022 by Lucas
# CC0 1.0 Universal/Public domain - No rights reserved # CC0 1.0 Universal/Public domain - No rights reserved
# #
# To the extent possible under law, the author(s) have dedicated all # To the extent possible under law, the author(s) have dedicated all
@ -68,7 +68,7 @@ EOF
# -t is needed for doas to read a password. # -t is needed for doas to read a password.
ssh -t "$login_name@$host" sh "$tmpdir/bu.sh" ssh -t "$login_name@$host" sh "$tmpdir/bu.sh"
sftp -o "user=$login_name" "$host" <<EOF sftp "$login_name@$host" <<EOF
get $tmpdir/$backup_name.tgz get $tmpdir/$backup_name.tgz
rm $tmpdir/* rm $tmpdir/*
rmdir $tmpdir/ rmdir $tmpdir/