vand777 said:You can set up ssh to listen on an external IP, remove the firewall rule in AWS Console (SSH to this external IP) but keep the relevant PF rule active. In this case nobody will be able to connect to your external IP unless you add the relevent firewall rule in AWS Console (which you will do only if something goes wrong with ssh listening internal DNS/IP).
I always do this on my servers in EC2. Just in case...
I was wrong. The above will not help.
What happens when you perform the following actions?
- Reboot - When you perform a reboot, the same virtual machine instance is rebooted. The original virtual machine instance that was provisioned to you is never returned back to Amazon. The public IP address will not change.
- Assign, reassign, remove an Elastic IP address - An instance can only have one public IP address at any given time. When an instance is assigned an Elastic IP, the EIP becomes its new public IP address and its previous public IP address (if one has already been assigned to it) will be released. For example, if you launch an instance and later assign an Elastic IP to it, the original public IP address of the instance will be replaced by the Elastic IP address. Later, if you disassociate the Elastic IP from the instance, a new public IP address will be assigned to the instance. The original public IP address will not be reassigned to the instance again.
- Relaunch - When you relaunch a server, the running instance is terminated and a new instance is launched in its place. The new instance will have new and different public and private IP addresses than its predecessor because it's a different virtual machine that's been allocated to you.
- Stop and Restart - When you stop a server, the associated instance is actually terminated. Therefore, when you restart the server, another virtual machine instance will be provisioned to you, so it will have new and different public and private IP addresses.