Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using a Debian server.
I am using the user svn for SVN. svn's home directory is /home/svn. All repositories are in /srv/svn.
In /home/svn/.ssh there is a file authorized_keys. This file contains the following line:

command="/usr/bin/svnserve -t -r /srv/svn/ --tunnel-user=<user>",no-port-forwarding,no-pty,no-agent-forwarding,no-X11-forwarding ssh-rsa AAAA<...>NhQ== <user>

svn owns /srv/svn and /srv/svn/<repo> .
When I try to connect to the server with the given ssh key , it works, so there should be no problem. But when I try to open the repository (I use TortoiseSVN on Windows with Pageant) with


it asks me for a password.
I have tried this with existing user <user> and non-existing user <user> on my server. Neither works.
What should I do to get it working? Did I miss anything?

Edit: Okeyyy, new info!
I have now set the permissions. Guess what.. svn can login! <user> can't.
But adding the user <user> to the OS and adding a home directory and copying the auth file to his directory WORKS. Now <user> can also login.
That's not really what I want. Is it possible to just make use of one file and use users which do not exist in the OS?

share|improve this question
Check /var/log/messages or /var/log/secure to see if it's spitting anything out when you attempt to login – kormoc Jan 31 '13 at 23:31
I even double checked those two files - nothing. – Marco Alka Feb 1 '13 at 16:42
up vote 1 down vote accepted

First thing I would try is setting the permissions on the directory/files correctly

find /home/svn/.ssh -type d -exec chmod 700 {} \;
find /home/svn/.ssh -type f -exec chmod 600 {} \;
chown -R svn:svn /home/svn/.ssh

then try logging in.

If this doesn't work, please post the contents of ssh -v svn@blah and anything from /var/log/messages /var/log/secure /var/log/auth.log or similar from sshd

Example of successful login

Feb  1 08:49:59 localhost sshd[25316]: Accepted publickey for root from port 34935 ssh2
Feb  1 08:49:59 localhost sshd[25316]: pam_unix(sshd:session): session opened for user root by (uid=0)

Example of unsuccessful login

Feb  1 08:54:09 localhost sshd[25478]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost  user=root
Feb  1 08:54:11 localhost sshd[25476]: error: PAM: Authentication failure for root from localhost

and of a ssh -v showing a key failure

debug1: Next authentication method: publickey
debug1: Trying private key: .ssh/blah.pem
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey,keyboard-interactive

Verify the key shown in ssh -v is the key you're trying to use and that it shows that it was processed successfully and sent to the server

share|improve this answer
As pointed out, I am using Windows. Keys are stored by Pageant. Every PuTTY based application checks Pageant for keys. TortoiseSVN's TortoisePlink.exe is PuTTY based. PuTTy itself is PuTTy based. Logging in with this key file works fine. OK. But you helped me a lot. Maybe you could also take a look at my edit? – Marco Alka Feb 4 '13 at 23:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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