I am cracking my nut here trying to get this to work, maybe someone can help me understand this a bit better. I found a question that is almost what I want to do called Accessing Subversion repository with 2 hops using svn+ssh protocol
Here is what I want to do:
I want to checkout a svn project on my Live server, but the svn server is not accessible on the internet. So I need to ssh tunnel into my main Network server, then into the SVN server and then checkout the files to the Live server
Here some fictive settings for clarity:
- The Live Server : (eth0) 10.123.210.123
- The Network Server : (eth0) 10.89.123.123 and (eth1) 192.168.1.1
- The SVN Server : (eth0) 192.168.1.8
All of the server authenticate with key files on port 9222 and server has a user admin with the valid key. So admin can log in to each server from almost any server, Live can't get to SVN directly logically.
So according to @epsilon-prime in the above mentioned post I should setup /home/admin/.ssh/config on the Live server with
Host mysubversionserver
HostName = 10.89.123.123
ProxyCommand = ssh 192.168.1.1 /usr/local/bin/nc -w 10 192.168.1.8 %p
ForwardX11 = no
User = admin
ForwardAgent = yes
Besides the fact that I can't connect with this setup, I don't really understand how this will help me get to the subversion server. Once use this ssh I am on the subversion server, but I need to be on the Live server with this tunnel.... or am I just missing something really obvious ?
ssh -P 9223:svn-server:9222 network-server
though from your live server, to establish a port-forward of the svn-server's ssh-port to local port 9223; you can then usessh -P 9223 localhost
to connect to the svn server over the forwarded SSH connection. – Rupconnect to host 192.168.1.1 port 9222: Connection timed out
If I ssh into the server and do a nslookup on that ip it works... I am pulling out my hair over here.. – Adesso