> siefke@192.168.2.160: Permission denied (publickey,password).
> 
> So I place the script in home folder, place systemd service file in home and
> run it with systemd --user.
> 
> The result is same. When run ssh samsung it works, when I run sync_docs.sh
> in shell it works. Why with systemd make it trouble?

service needs SSH_AUTH_SOCK iirc.

[Service]
Environment=SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh

(or wherever the socket is located on your machine)

Reply via email to