aws / aws-ec2-instance-connect-cli

This is an all-in-one client for EC2 Instance Connect that handles key brokerage and establishing connection to EC2 Instances through an interface near-identical to standard system ssh, sftp, and other utilities.
Apache License 2.0
159 stars 42 forks source link

Feature request: add autossh like option #14

Open guillaumedenece opened 4 years ago

guillaumedenece commented 4 years ago

Hi!

I use mssh to create an SSH tunnel. Something that I think could be interesting is to have an autossh like option. This would allow the SSH tunnel to be "persistent", meaning that the tunnel would always run. For example, once the ssh connection times out (By server-side timeout), the tunnel would be re-established automatically.

Thank you!

yassinecc commented 3 years ago

@LordAlfredo ?

Maks3w commented 3 years ago

Could you give a try to this script works entirely inside of ssh/config

https://gist.github.com/Maks3w/de72b0160d5e6af958adc42eab014624

In your case the main line you need to test is Host ... exec "aws-proxy ....."