code: func readVersion(r io.Reader) ([]byte, error) {
  	versionString := make([]byte, 0, 64)
  	var ok bool
  	var buf [1]byte
  
  	for len(versionString) < maxVersionStringBytes {
  		_, err := io.ReadFull(r, buf[:])
  		if err != nil {
  			return nil, err
  		}
  		// The RFC says that the version should be terminated with \r\n
  		// but several SSH servers actually only send a \n.
  		if buf[0] == '\n' {
  			ok = true
  			break
  		}
  
  		// non ASCII chars are disallowed, but we are lenient,
  		// since Go doesn't use null-terminated strings.
  
  		// The RFC allows a comment after a space, however,
  		// all of it (version and comments) goes into the
  		// session hash.
  		versionString = append(versionString, buf[0])
  	}
  
  	if !ok {
  		return nil, errors.New("ssh: overflow reading version string")
  	}
  
  	// There might be a '\r' on the end which we should remove.
  	if len(versionString) > 0 && versionString[len(versionString)-1] == '\r' {
  		versionString = versionString[:len(versionString)-1]
  	}
  	return versionString, nil
  }
docs: // Read version string as specified by RFC 4253, section 4.2.