rsync over OpenSSH error

Garry Knight garryknight at
Sun Dec 24 15:23:13 UTC 2006

Brian Fahrlander wrote:

>> I'm not an expert on rsync or ssh, but this looks like an error
>> returned by ssh.

> Nope, you've got it, it's ssh.

I confirmed that when I tried to ssh in as root. I get exactly the same
error. I can ssh in as a user ok, though.

>     1. Use RSA keys.

I was intending to do just that, once I've got it working with basic

>     2. I'm guessing that you're transferring files across an insecure
> mechanism (otherwise ssh wouldn't be necessary).

It's a home LAN with my laptop on a wireless link to my PC. My neighbours
aren't tech-savvy in the slightest, and it's remote enough not to get
hacked by drive-bys, but then that's the situation in which it's easy to
get sloppy.

> In the long term, SSH 
> is going to do a lot of expansion on the data to be moved; you might
> want to turn up the compression a good bit. (1-Adam-12: see the man.)

At the moment there's only about 3 GB of data to sync and it was running
happily in the background, but I'll speed it up once I get it working. (I
didn't get the Adam reference, though.)

>     Now, while the above isn't a solution to the exact message you're
> getting, it's just possible that by switching to RSA keys, you can at
> least _avoid_ the core problem.  And in so doing, you make things both
> quicker and safer, so it's a good idea.

Well, here's what I've found in doing a little more digging around. My sync
script was using sudo to call rsync. I want to run it as root so it has
permission to change perms on the received files and directories. When I
remove the sudo from the line, it works fine - for a regular user, although
it gives me a lot of perms errors. It's when I run it as root (either
directly or via sudo) that it gives me the "Permission denied (publickey,
keyboard-interactive)" error.

One of the websites I found suggested I could get around the error by
forcing SSL version 1 with "ssh -1 user at" and, though it
doesn't result in the original error, it still throws out root's password.
And this is what gave me the answer: I'd recently reinstalled Ubuntu on the
PC and hadn't got around to giving root a password. As simple as that.

Now I can ssh, scp, and rsync to my heart's content. Now I'll go back and
set up RSA keys.

>     Thumbnail sketch:
>     The user that's doing the ssh runs "ssh-keygen -t rsa".

I know how it's done, but thanks for the recap.

>     There are _tons_ of RSA howtos.

Yes, that's where I learned how. And in concentrating on the fine details of
ssh and rsync, I'd overlooked what might have been obvious were it not for
a somewhat misleading error message.

Anyway, thanks for your help. Have a good Christmas. :-)

Garry Knight
garryknight at

More information about the ubuntu-users mailing list