1
1 Comment

[idea] CLI to open SSH port on your ec2 instance only when needed.

This is what the login process looks like for me:

  • Log into the EC2 console
  • Open the SSH port for whatever my current IP happens to be (I travel a lot)
  • Now I can finally get in with SSH

I like this setup because it is super secure and keeps out script kiddies, but it is a big hassle. I am thinking about making a CLI wrapper for ssh to automate this process. It would open the port for you before connecting, then automatically close things up when your session has ended. Is there anyone else out there who would like a tool to do this?

on July 16, 2019
  1. 1

    Have you looked into Terraform or CloudFormation? Should be able to pull this off w/o rolling your own script for it.