It took me some time to figure this one out, as everybody is using rsync and ssh-keys without passphrases, but I insist that an ssh-key should have a passphrase.
In my first attemts I got this error messages mailed to me by crontab:
Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive).
Here are the steps to automate a backup initiated from crontab using rsync, SSH and ssh-keys with a passphrase:
Make a set of SSH keys.
Setup SSH to use the agent automatically.
Login once as the user who's cron will run the backup script. You will be asked for a passphrase. When the machine reboots, you will need to login once more, to enter the passphrase again.
Make a backup script that includes some SSH variables.
This script could be as simple as this:
. /home/username/.ssh/variables
rsync -avz --delete /data/ example.com:data
N.B. This variables file only contains these lines:
SSH_AUTH_SOCK=/tmp/ssh-DmFcb18036/agent.18036; export SSH_AUTH_SOCK;
SSH_AGENT_PID=18037; export SSH_AGENT_PID;
echo Agent pid 18037;
Put that script in crontab.
That should do it for you, as it works like a charm for me!
-
https://meinit.nl/using-rsync-from-cron-with-ssh-keys-that-have-a-passphrasevariables=~/.ssh/variables
sshadd() {
source "$variables" > /dev/null
ssh-add -l > /dev/null 2>&1
case "$?" in
1)
ssh-add > /dev/null 2>&1
;;
2)
rm "$variables"
sshagent
;;
esac
}
sshagent() {
if [ -f "$variables" ] ; then
sshadd
else
ssh-agent -s > $variables
sshadd
fi
}
sshagent
-
https://meinit.nl/enter-your-ssh-passphrase-once-use-it-many-times-even-from-crontabuseful script to migrate redis server without downtime
-
https://github.com/RedisLabs/redis-migratebzip2 en mode parallel : apt-get install pbzip2
-
http://tukaani.org/lzma/benchmarks.htmlPour installer xymon rapidement
via doo
-
https://github.com/theonlydoo/configz/tree/master/roles/xymonextension pour dl les sub à partir de vlc :o
à tester
-
https://github.com/exebetche/vlsub/Pour qu'enfin firefox arrête de me demander 1000 fois mon master password quand je le lance
-
https://addons.mozilla.org/fr/firefox/addon/startupmaster/Try do DL sub for new video files in /torrent/folder/
cd /torrent/folder/ && for file in $(comm -13 <(find .|grep -E "(srt)$"|sort) <(find .|grep -E "(avi|mkv|mp4)$"|sed -r 's/.[^.]+$/.srt/'|sort)); do addic7ed $file; done
-
https://github.com/BenoitZugmeyer/addic7ed-cli