bin/i2cssh in i2cssh-1.13.2 vs bin/i2cssh in i2cssh-1.14.0

- old
+ new

@@ -218,11 +218,15 @@ opts.on '-X', '--extra EXTRA_PARAM', String, 'Additional ssh parameters (e.g. -Xi=myidentity.pem)' do |x| ssh_options << "-" + x.split("=").join(" ") end - + opts.on '-g', '--gateway HOST', String, + 'Multihop SSH connection gateway string (e.g. username@gateway) - usually used with -A' do |g| + # ssh_gateway = g + opts_from_cmdline[:gateway] = g + end end optparse.parse! if opts_from_cmdline[:tabs] puts 'Disabling broadcast for tab split mode...' @@ -274,10 +278,14 @@ end @i2_options.each_with_index do |opt, i| if opt[:login] @servers[i] = @servers[i].map{|h| "#{opt[:login]}@#{h.gsub(/.+@/,'')}"} - end + end + if opt[:gateway] + puts opt[:gateway] + @servers[i] = @servers[i].map{|h| "#{opt[:gateway]} -t ssh #{h}"} + end end if @servers.empty? puts "ERROR: no servers given"