Created
August 4, 2012 11:05
-
-
Save akiradeveloper/3256737 to your computer and use it in GitHub Desktop.
My Guess: How ssh command works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SSHServer | |
def accept?(client) | |
authorized_keys.each do |public_key| | |
return true if client.has?( private_key_of(public_key) ) | |
end | |
return false unless permit_password_authentification | |
return true if client.respond(password) | |
return false | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment