I have an extensive network of servers all currently hosted on AWS EC2.

For reasons of cost I plan to gradually migrate to dedicated servers where possible.

So: How can I best combine AWS and non-AWS servers in my network?

Ideally, I should be able to assign internal IP addresses to the external servers, include them in AWS security groups and ensure that all private traffic between my AWS servers and external servers is secure.


To accomplish this, you will need to use the Hardware VPN feature of Amazon Virtual Private Cloud, where the VPN is connected to your new non-Amazon servers. See Amazon's documentation on setting this up.


Depending on what communication you need between the AWS servers and the non-AWS servers, you might be able to get by with just using communication tools that are secure on their own, such as ssh, in which case, the only thing you need is a key distribution system and your own rules about which machine can connect to which other machine.

I use this method with a home-grown system to configure ssh. Each machine has one private ssh key. My configuration machine (my desktop) has all the public keys and can ssh to all other machines. It generates ~/.ssh/authorized_keys and ~/.ssh/config files for all other machines and can update them as needed.

For example, I have non-AWS servers that I use for various things, but I also have an AWS server that I use for backup and some other uses. The backup is done with rsync, which uses ssh, so I consider it as secure as any other solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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