-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demonstrate connections, both failing and successful
* Set the proper host public key for github.com and also random host public key from an entirely different server which is wrong for github.com. * Demonstrate creation of a `Net::SSH::KnownHosts`-like object, but a custom one knowing only about the one host to which we want to connect (because who cares about the ones to which we're not connecting). * Try connecting with an improper host key and ensure we fail. * Try connecting with the proper one and ensure that the connection succeeds. Note that for the successful connection we go only as far as authenticating the remote host; we don't ask them to authenticate us. (We just disconnect instead when we reach the point where we would do that.) Known Issues: * We don't test to see what happens when we've mistakenly set security to "allow an attacker if we don't know a host key" (i.e., that the `MyKnownHost.add_host_key` method properly disses you).
- Loading branch information
Showing
1 changed file
with
91 additions
and
3 deletions.
There are no files selected for viewing
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