Javascript makes this better :)

Userify Blog

February 17, 2017 Automatically re-connect a disconnected SSH session with AutoSSH How to keep your SSH session running even through network interruptions with AutoSSH.
February 5, 2017 Connect to MySQL/RDS through an EC2 SSH Tunnel Use SSH to safely access data in your MySQL RDS data stores with just a single command.
February 4, 2017 Connect to Redis/Elasticache through an EC2 SSH Tunnel Quickly and efficiently use SSH to safely access data in your Redis Elasticache data stores.
February 4, 2017 Connect to Memcache/Elasticache through an EC2 SSH Tunnel Use SSH to safely access data in your Memcache Elasticache data stores with just a single command.