I' m using lsyncd to sync a folder between local and remote machines with default.rsyncssh
config. But it asks for password every time file changes. I found there' s an option password_file
, but using it causes the daemon exist giving no message. How to remember ssh password with lsyncd? Or is there any cross-platform GUI that can be easily configured to sync file/folder through ssh? I like the sync GUI of Transmit very much, but it is paid and only on OS X.
1 Answer
Try authenticating with an ssh key. Any program using ssh for the transfer will automatically find the key and not need a password.
Simply run
ssh-keygen -t rsa -f ~/.ssh/id_rsa
Then append your new ~/.ssh/id_rsa.pub
onto the remote side's ~/.ssh/authorized_keys
file
ssh USER@REMOTE_HOST 'cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.pub
and now you should be able to ssh to the remote host without a password.
This is generally a better idea than storing your password in a file, since you might be using that password other places and if someone found it, you'd have multiple things compromised.
http://www.rackspace.com/knowledge_center/article/install-and-configure-lsyncd