Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on May 22, 2012
@CraigCottingham CraigCottingham Add support for -i option to ssh as well as using public or private I…
…P address as hostname in connect
928d44a
Commits on May 23, 2012
@lodestone Merge pull request #2 from CraigCottingham/connect
More options to the connect command
dbdced8
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/ftl/client.rb
View
4 lib/ftl/client.rb
@@ -119,7 +119,9 @@ def cancel(args={})
def connect(args={})
if match = find_instances(args.first).select{|i| i.state == "running" }.first
- exec("ssh #{options[:username]||'root'}@#{match[:dns_name]}")
+ opt_key = "-i #{options[:keys][match[:key_name]]}" unless (options[:keys].nil? || options[:keys][match[:key_name]].nil?)
+ hostname = match[:dns_name] || match[:public_ip_address] || match[:private_ip_address]
+ exec("ssh #{opt_key} #{options[:username]||'root'}@#{hostname}")
else
display "Typo alert! No server found!"
end

No commit comments for this range

Something went wrong with that request. Please try again.