I’m new to AWS and to cloud in general, so please, forgive my ignorance.
But is the default SSH key pair that Lightsail gives you when you configure a new instance secure at all?
I guess I’m confused by the fact that a default key - which seems to be the same for the whole AWS region - is the only thing I need to access my instance by SSH… The host is public, the username are all the same, there is no password and the SSH key is the default one.
What am I missing, here? Is it that the private part of the default key is actually unique to everybody each time an instance is created?
I’m just scared that my website isn’t protected right now.
Not sure about lightsail specifically, but ec2 keypairs are unique to an AWS account. When launching ec2 instances individually (not via lightsail) you can make one per instance or have one key pair for all of your instances but that lives inside if your account only.
You have the option to import your own asymmetric key pair or have one generated by AWS. Either way, the key will remain secure as long as you take proper precautions.
This is less an AWS question and more of an SSH question.
You may be lacking some sysadmin fundamentals. Don’t overlook those just because you’re dealing with “the cloud.”
WRT AWS though, it’s “default” in the sense that unless you create or specify a different keypair when creating other instances in the future, that is the key that will be used. AWS uses the same terminology elsewhere as well, such as the Default VPC, or the Default Subnet, etc.
There is also a factor of time and resources to brute force the encryption algorithm. In other words, with a powerful computer it may take six months to break the encryption. So… You change keys every 3-4 months. Problem solved.
Just as an aside, assuming you used the entire computing power of the bitcoin network, it would still take multiples of the age of the universe to brute force an SSH key:
you should be using one key pair per one (each) connecting user. each user should have a different key pair and never divulge the secret half under any circumstance. the endpoint being connected to should accept as many keys as it wants to accept users.