0

This has been a headache. Where to begin? So far, I've followed this article, along with its follow-up tutorial and my output when I try to do

svn+engine_ssh://[insert-elastic-ip-here]/var/svn/test

I get the following output:

Permission denied (publickey).
svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: Network connection closed unexpectedly

My config file looks like the following in the tunnels section (on ec2 server):

[tunnels]

engine_ssh = /usr/bin/ssh -l username

I have the same listing in tunnels on my local machine, only using my local username as opposed to my remote username.

I'm guessing the issue is that I need to generate an ssh key and somehow set it up on my server? The issue is that ec2 the file used is called hosts.pem as the IdentityFile for my ssh config file.

Thus, what am I doing wrong here? What can I do? Are there alternatives to using SSH + svn for my server?

If anyone needs more info I'd be glad to post it.

2 Answers 2

1

Yeah, you'll need for your server to allow login over SSH in one way or another - be it via allowing password login in your sshd_config or using key logins - see this question for some details on getting key login working.

You're overcomplicating the checkout process a bit; your username spec can be included in the checkout URL, no tunnel config needed. This'll work just fine:

svn+ssh://remoteusername@[insert-elastic-ip-here]/var/svn/test

Are there alternatives to using SSH + svn for my server?

Yes, absolutely. Your question's title references svnserve, but that's not accurate, since you aren't using it - that's method 1, and is pretty basic. You don't want to use it over the internet, as there's no encryption - of data or credentials.

Method 2 is the SSH method that you're presently working with.

Method 3 is a web server using WebDAV to serve the repository; the typical go-to option is Apache and the mod_dav_svn module. You can definitely take a look at it if you don't like the SSH option; it's a little more flexible.

1

I'm guessing from the error you're seeing that you haven't put your personal ssh key onto the remote machine.

A quick solution to your problem would probably be to just add your local id_rsa.pub to the server's authorized keys file.

First: cat ~/.ssh/id_rsa.pub

Second: copy that full string and then edit /home/USERNAME/.ssh/authorized_keys pasting the id_rsa.pub string there.

If you don't have a personal ssh key yet, just run ssh-keygen.

Optionally if you don't want to do that, you can just use the ssh key for the EC2 machine by specifying the SVN_SSH environment variable.

export SVN_SSH="ssh -i path_to_your/key/goes/here"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .