0

System environment :

Server: Centos 6.2

Client: Windows + TortoiseSVN + putty

I have installed subversion in centos, created repository on server, and configured svn+ssh access way using key authentication. Everything works fine. But I have a question about svn user using svn+ssh mode.

The svn user have a ssh key, so he can access subversion server and of course he can also access Centos server by SSH using the key authentication. Further, he can copy subversion repository files(Specifically /db files) from centos server using like WinSCP tool base on SSH. So, I wanna know if there is a way that let the svn user just can access svn repository via svn+ssh and can't copy repository files from centos directly via ssh accessing? If he can copy repository files from centos server via ssh, I think the svn access control realized by conf/authz file doesn't make any sense and svn repository isn't safe.

I just learn how to create a svn+ssh subversion server, so maybe my knowledge isn't enough, please give me a idea or just tell me whether a solution exists. If can't prohibit copying files from Linux server via SSH, I will use svn or http(s) access mode.

Thank you!

1

1 Answer 1

0

I found a way to solve this problem.

add command into authorized_keys file to disable ssh shell login and scp, but enable svn+ssh, like this:

"/usr/bin/svnserve -t -r /svn/test/",no-port-forwarding,no-pty,no-agent-forwarding,no-X11-forwarding

after add your authorized_keys file will like this:

command="/usr/bin/svnserve -t -r /svn/test/",no-port-forwarding,no-pty,no-agent-forwarding,no-X11-forwarding ssh-rsa A......................................................................

I think this is one solution, do your have others? Please let me know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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