rsync over OpenSSH error

Brian Fahrlander brian at
Sat Dec 23 21:55:22 UTC 2006

Hash: SHA1

Garry Knight wrote:
> Until recently I've been using rsync between my laptop and PC without any
> problems. Both run Kubuntu 6.06 LTS Dapper Drake.
> Just recently, when trying to sync directories across machines, I've been
> getting the following error (on the machine on which I start the rsync):
> Permission denied (publickey, keyboard-interactive).
> I'm not an expert on rsync or ssh, but this looks like an error returned by
> ssh. On both machines, I'm using version 1:4.2p1-7ubuntu 3.1 of
> openssh-client and the same version of openssh-server, and version
> 2.6.6-1ubuntu2 of rsync.

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

> As I said, I'm not an expert, and I've looked at ssh_config on both machines
> until I'm blue in the face (well, a darker shade of pink...) and can't
> think what's going on.

    There's a couple of things here.

    1. Use RSA keys.  This isn't a solution to "Permission denied", but
it will make your life easier, and provides good protection against the
bots that guess usernames and passwords. (Yes, I created an account
"test", with a password of "password" once, and they got me. The threat
is real.)

    2. I'm guessing that you're transferring files across an insecure
mechanism (otherwise ssh wouldn't be necessary). 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.)

    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.

    Thumbnail sketch:

    The user that's doing the ssh runs "ssh-keygen -t rsa".  Inside that
user's .ssh directory it'll create id_rsa and  The "pub"
file goes into $HOME/.ssh/authorized_keys.  Then the next time you
attempt the connection, it won't ask for a password, and all is well.

    There are _tons_ of RSA howtos.  Heck, even Wil Wheaton wrote one.
Pick one that suits your reading style and have fun!

    (And you can write me, offlist, if you need help.)

- --
 Brian Fahrländer                 Christian, Conservative, and Technomad
 Evansville, IN                    
 ICQ: 5119262                         AOL/Yahoo/GoogleTalk: WheelDweller
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the ubuntu-users mailing list