@@ -65,6 +65,8 @@ def main():
6565 parser .add_argument ('--prefix' , default = '' , help = 'Specify a prefix to prepend to all host names' )
6666 parser .add_argument ('--private' , action = 'store_true' , help = 'Use private IP addresses (public are used by default)' )
6767 parser .add_argument ('--profile' , help = 'Specify AWS credential profile to use' )
68+ parser .add_argument ('--postfix' , default = '' , help = 'Specify a postfix to append to all host names' )
69+ parser .add_argument ('--proxy' , default = '' , help = 'Specify a bastion host for ProxyCommand' )
6870 parser .add_argument ('--region' , action = 'store_true' , help = 'Append the region name at the end of the concatenation' )
6971 parser .add_argument ('--ssh-key-name' , default = '' , help = 'Override the ssh key to use' )
7072 parser .add_argument ('--strict-hostkey-checking' , action = 'store_true' , help = 'Do not include StrictHostKeyChecking=no in ssh config' )
@@ -155,7 +157,7 @@ def main():
155157 counts_incremental [instance_id ] += 1
156158 instance_id += '-' + str (counts_incremental [instance_id ])
157159
158- hostid = args .prefix + instance_id
160+ hostid = args .prefix + instance_id + args . postfix
159161 hostid = hostid .replace (' ' , '_' ) # get rid of spaces
160162
161163 if instance .id :
@@ -186,6 +188,8 @@ def main():
186188 print (' IdentitiesOnly yes' )
187189 if not args .strict_hostkey_checking :
188190 print (' StrictHostKeyChecking no' )
191+ if args .proxy :
192+ print (' ProxyCommand ssh ' + args .proxy + ' -W %h:%p' )
189193 print ('' )
190194
191195
0 commit comments