wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.98k stars 263 forks source link

Awless ssh, add an option to specify end target port behind bastion #154

Closed rgarrigue closed 6 years ago

rgarrigue commented 6 years ago

Hello

I'ld like to connect to my gitlab port 2222 through my bastion. The command could look like this

awless ssh --through me@ssh-bastion gitlab:2222
awless ssh --through me@ssh-bastion gitlab --end-port 2222

I tried --port, but it's connecting to bastion's port 2222 instead of gitlab's, something like

awless ssh --through me@ssh-bastion:2222 gitlab

The reason behind this is, I moved gitlab server's sshd to 2222 since 22 is used by git. No the most common case, but it happens.

Thanks for the very very nice cli by the way :clinking_glasses:

simcap commented 6 years ago

Thanks. Fixed in master (and for next release 0.1.6).

Introduced a --through-port flag to specify a proxy port. If not specified it will be 22. We avoided the otherwise good notation me@bastion:2222 since host & instance names can contains a : char.

You can use the -h help flag i.e. awless ssh -h as I have added more example and better doc.