Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (23 sloc) 0.612 kb
require "rye"
# May need to update this in the future with a
# different free SSH provider
@hostname = "shellmix.com"
## Don't prompt for password if "publickey" is the only :auth_method
box = Rye::Box.new(
@hostname,
:auth_methods => ["publickey"]
)
begin
box.connect
rescue Net::SSH::AuthenticationFailed => ex
ex.class
end
#=> Net::SSH::AuthenticationFailed
## Never prompt for password if :no_password_prompt option is true
box = Rye::Box.new(@hostname, :password_prompt => false)
begin
box.connect
rescue Net::SSH::AuthenticationFailed => ex
ex.class
end
#=> Net::SSH::AuthenticationFailed
Jump to Line
Something went wrong with that request. Please try again.