Open KevinGimbel opened 5 years ago
Any word on this?
Any word on this?
This feature request is already in our backlog. I will update here once we have more info on it.
To expand on that. It'd be nice to even use the same ssh config file or at least being able to script SSH via SSM tunneling similar to:
Host *
TCPKeepAlive yes
ServerAliveInterval 30
ConnectTimeout 10
host i-*.* mi-*.*
ProxyCommand bash -c "aws ssm start-session --target $(echo %h|cut -d'.' -f1) --region $(echo %h|/usr/bin/cut -d'.' -f2) --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
User ec2-user
host i-* mi-*
ProxyCommand bash -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
User ec2-user
Then you would just:
mssh ec2-user@i-0ded1d8c2282ee39e.ap-southeast-2
or
mssh i-0ded1d8c2282ee39e.ap-southeast-2
Take a look to this implementation of ssh_config. I think you can do your changes for provide the region, etc as extra arguments to the aws-proxy script.
https://gist.github.com/Maks3w/de72b0160d5e6af958adc42eab014624
any news regarding this?
Any update on this.. This is a feature that I'm eagerly waiting
By using the
~/.ssh/config
file on my PC,ssh
can be configured to allow easy and quick connections to remote servers by simply typing a hostname, e.g.ssh my-server-1
and all configuration is taken from the~/.ssh/config
file.I would like to have a similar way to configure
mssh
so that I could just domssh my-server-2
and the ID, username, and profile is taken from the config file. The syntax could be the same, e.g.As we have a quite a lot of servers this is a function I am missing at the moment compared to using SSH directly.