You are here

Amazon Web Services: Tunneling SVN over SSH

After installing Subversion in an Amazon EC2 instance, set the Security group to allow SSH from your IP and SVN from the EC2 instance's IP.
Connect to the Amazon EC2 instance using the key provided by Amazon and forward the Local SVN port to the Remote SVN port.
ssh -i ~/.ssh/AWS-ubuntu-key.pem ubuntu@xxx.xxx.xxx.xxx -L 3690:xxx.xxx.xxx.xxx:3690
You should now be able to connect to your remote SVN server via SSH tunnel using:
svn co svn://localhost/repository

For Cloud9 (c9.io) specific instructions:
Within a Cloud9 instance, take the default SSH key assigned for you account and add it to the Amazon instance's .ssh/authorized-keys file.
Set the Security group in Amazon EC2 to allow SSH from the IP exposed by your Cloud9 instance.
Open a Cloud9 terminal and connect to the Amazon EC2 instance and forward the Local SVN port to the Remote SVN port over SSH.
ssh ubuntu@xxx.xxx.xxx.xxx -L 3690:xxx.xxx.xxx.xxx:3690
You should now be able to open a new Cloud9 terminal and connect to your remote SVN server via the SSH tunnel using:
svn co svn://localhost/repository

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer