class Net::SSH::HostKeyError

def port

Returns the port number for the remote host, as reported by the socket.
def port
  @data && @data[:peer] && @data[:peer][:port]
end