Here's my comment in elaborated answer form.
On the local host, run ssh-keygen
, most likely saving the key in the default location and not using a passphrase. Next, use ssh copy-id <user@host>
to copy the public key to the remote host.
For your script, do something like:
scp "$FILE_TO_BURN" $REMOTE_USER@$REMOTE_HOST:"$BURN_DROP_DIR"
ssh $REMOTE_USER@$REMOTE_HOST $BURN_COMMAND
ssh $REMOTE_USER@$REMOTE_HOST rm "$BURN_DROP_DIR/$(basename $FILE_TO_BURN)"
Feel free to flesh it out with error detection by capturing the exit status/output of the ssh commands. You might also want to look into doing this without copying the whole file first using something like sshfs (packaged by most distros) to mount the directory containing the file to burn over the network.