3 ms·
If your servers are 'permanent', then give them a short hostname and put them in your .ssh/config and DNS (or hosts file). 'ssh cron' or 'ssh archive' and conne
by vacri 11y ago
If your servers are 'permanent', then give them a short hostname and put them in your .ssh/config and DNS (or hosts file). 'ssh cron' or 'ssh archive' and connecting directly is quicker than going through a dialogue, or using an index number and having to remember which is which (or worrying about the index number changing when you refresh).
This tool would be good for temporary or autoscaling instances, though.
- soheil 11y agoI made it primarily for my temp servers, it's also useful if you keep restarting a box as the DNS name changes on reboot. As someone else also mentioned I think a nice addition would be to allow the name to be passed instead of just the index. The thing with temp servers is that, I don't usually bother to name them, hence again, this tool.
- vacri 11y agoIf you have instances in a VPC, they will keep their IP addresses until you destroy them. Turn them off for a week, then back on, and they bounce back with the same IP as before. EC2 classic servers will also keep their IP addresses (and hence aws-assigned hostnames) through a reboot (in which the VM itself doesn't actually get torn down), but not through a stop/start cycle. Edit: If your tool works for you, go for it. I don't mean to sound discouraging.
- soheil 11y agoThanks for clarifying the reboot sequence, I do, however, stop/start instances on a regular basis to save cost. Also good to know VPC behaves differently in that respect. I'm working on adding VPC support.
- soccerdave 11y agoIdeally, none of your servers on EC2 should be 'permanent' :) Although having EBS available makes it easier to start relying on them as if they are permanent.