Class Index [+]

Quicksearch

Net::SSH::HostKeyMismatch

Raised when the cached key for a particular host does not match the key given by the host, which can be indicative of a man-in-the-middle attack. When rescuing this exception, you can inspect the key fingerprint and, if you want to proceed anyway, simply call the remember_host! method on the exception, and then retry.

Public Instance Methods

[](key) click to toggle source

An accessor for getting at the data that was used to look up the host (see also #, #, #, #, and #).

    # File lib/net/ssh/errors.rb, line 52
52:     def [](key)
53:       @data && @data[key]
54:     end
fingerprint() click to toggle source

Returns the fingerprint of the key for the host, which either was not found or did not match.

    # File lib/net/ssh/errors.rb, line 58
58:     def fingerprint
59:       @data && @data[:fingerprint]
60:     end
host() click to toggle source

Returns the host name for the remote host, as reported by the socket.

    # File lib/net/ssh/errors.rb, line 63
63:     def host
64:       @data && @data[:peer] && @data[:peer][:host]
65:     end
ip() click to toggle source

Returns the IP address of the remote host, as reported by the socket.

    # File lib/net/ssh/errors.rb, line 73
73:     def ip
74:       @data && @data[:peer] && @data[:peer][:ip]
75:     end
key() click to toggle source

Returns the key itself, as reported by the remote host.

    # File lib/net/ssh/errors.rb, line 78
78:     def key
79:       @data && @data[:key]
80:     end
port() click to toggle source

Returns the port number for the remote host, as reported by the socket.

    # File lib/net/ssh/errors.rb, line 68
68:     def port
69:       @data && @data[:peer] && @data[:peer][:port]
70:     end
remember_host!() click to toggle source

Tell Net::SSH to record this host and key in the known hosts file, so that subsequent connections will remember them.

    # File lib/net/ssh/errors.rb, line 84
84:     def remember_host!
85:       @callback.call
86:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.