1

I'm attempting to use lsyncd to automatically move files to my local development server. My host is OSX 10.9.

SSH on the server works. I can connect using ssh from the host. I am using an SSH key to login. I want to do the same with lsyncd and have it use the same key.

I have installed https://github.com/markcarver/mac-ssh-askpass because OSX doesn't include ssh-askpass but it keeps asking for the password for root@snapdev.com.

I've had such a headache using lsyncd on Mac OSX 10.9. Google doesn't help much as the options used between the different versions of lsyncd have changed and articles/guides are inconsistent.

Here is my settings file:

settings {
        logfile = "/var/log/lsyncd/lsyncd.log",
        statusFile = "/var/log/lsyncd/lsyncd.status",
        statusInterval = 1
}
sync {
    default.rsyncssh,
        source = "/Users/jay/Desktop/snapnames",
    host = "snapdev.com",
    targetdir = "~/public_html",
    excludeFrom = "/etc/lsyncd/lsyncd.dev.exclude",
    rsync = {
        protect_args = false,
        archive = true,
        compress = false,
        whole_file = false,
    },
    ssh = {
        port = 1337,
        _extra = {"/usr/bin/ssh -l developer -p 1337 -i /Users/jay/.ssh/id_rsa.pub -o StrictHostKeyChecking=no"}
    }
}

Why is it asking for a password? SSH works without a password using my key on the same host.

So confused because I am not even logging in as root

Edit: I've now switched to using Grunt. Too much hassle with lsyncd on OSX. I'd still like an answer though so I know where I was going wrong.

0

It looks like you're submitting the public version of your key instead of your private.

Try changing:

/Users/jay/.ssh/id_rsa.pub

to

/Users/jay/.ssh/id_rsa

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.