def ssh(app_name)
raise ArgumentError, "No application specified" unless app_name.present?
raise OptionParser::InvalidOption, "No system SSH available. Please use the --ssh option to specify the path to your SSH executable, or install SSH." unless options.ssh or has_ssh?
rest_app = rest_client.find_application(options.namespace, app_name)
say "Connecting to #{rest_app.ssh_string.to_s} ..."
if options.ssh
debug "Using user specified SSH: #{options.ssh}"
Kernel.send(:system, "#{options.ssh} #{rest_app.ssh_string.to_s}")
else
debug "Using system ssh"
Kernel.send(:system, "ssh #{rest_app.ssh_string.to_s}")
end
end