I was using the GUI version of Transmission for Ubuntu. When my torrents were downloaded I ran the following script as user server with the corresponding ssh keys:
#!/bin/bash
cd "/home/server/Downloads"
find . -type f | while IFS= read filename; do
case "${filename,,*}" in
*.part) : ;; # Excludes *.part files from being moved
*.resume) : ;;
*.torrent) : ;;
*.trashinfo) : ;;
move.sh) : ;;
# Include
*document*) scp "$filename" "imac@imac.local:/users/imac/Documents/" ;;
# Else
*) echo "Don't know where to put $filename" ;;
esac
done
Now I'm using transmission-daemon and the script is not executed as server anymore, therefore, scp does not work because when trying to ssh to imac@imac.local it prompts for a password (no ssh key for that user).
How can I fix this problem?