code: func validateKey(key PublicKey, user string, c packetConn) (bool, error) {
  	pubKey := key.Marshal()
  	msg := publickeyAuthMsg{
  		User:     user,
  		Service:  serviceSSH,
  		Method:   "publickey",
  		HasSig:   false,
  		Algoname: key.Type(),
  		PubKey:   pubKey,
  	}
  	if err := c.writePacket(Marshal(&msg)); err != nil {
  		return false, err
  	}
  
  	return confirmKeyAck(key, c)
  }
docs: // validateKey validates the key provided is acceptable to the server.