1. All knowledge is either immediate (not inferred from evidence) or mediate (inferred from immediate knowledge that serves as its evidence).
2. All immediate knowledge is about our ideas or sensations.
3. If we are to have knowledge of external objects, it must be by means of an adequate inference from knowledge of our ideas and sensations. (1,2)
4. But there is no adequate inference from knowledge of our ideas and sensations to our beliefs about external objects.
We can have no knowledge of external objects.
[Greco, J., “Reid’s Reply to the Skeptic,” in The Cambridge Companion to Reid, Terence Cuneo and René van Woudenberg, eds., Cambridge: Cambridge University Press, 2004, pp. 134-155; p. 143. Also quoted in Klima, G., "Putting Skeptics in Their Place vs. Stopping Them in Their Tracks: Two Anti-Skeptical Strategies," online PDF.]
Klima notes that Berkeley uses this argument against the materialist account of the external world:
But, though it were possible that solid, figured, movable substances may exist without the mind, corresponding to the ideas we have of bodies, yet how is it possible for us to know this? Either we must know it by sense or by reason. As for our senses, by them we have the knowledge only of our sensations, ideas, or those things that are immediately perceived by sense, call them what you will: but they do not inform us that things exist without the mind, or unperceived, like to those which are perceived. This the materialists themselves acknowledge. It remains therefore that if we have any knowledge at all of external things, it must be by reason, inferring their existence from what is immediately perceived by sense. But what reason can induce us to believe the existence of bodies without the mind, from what we perceive, since the very patrons of Matter themselves do not pretend there is any necessary connexion betwixt them and our ideas? I say it is granted on all hands (and what happens in dreams, phrensies, and the like, puts it beyond dispute) that it is possible we might be affected with all the ideas we have now, though there were no bodies existing without resembling them. Hence, it is evident the supposition of external bodies is not necessary for the producing our ideas; since it is granted they are produced sometimes, and might possibly be produced always in the same order we see them in at present without their concurrence.[PHK I, 8]
However, as I noted before, Berkeley rejects the No Good Inference Argument for the external world itself. His primary strategy is to deny that (3) follows from (1) and (2) -- and indeed, he is right to do so, since (1) and (2) yield (3) only if the immediate knowledge of ideas and sensations is not also an immediate knowledge of external objects. But Berkeley doesn't hold this; to know our ideas immediately is to know external objects immediately. (We also have inferred knowledge of external objects, of course; but that's not a problem given the immediate knowledge.) Since Berkeley understands 'idea' to mean any object of sensory perception, Berkeley's basic position is the following:
(B) The very objects we sense are (in some way) the external objects themselves.*
Berkeley is very explicit that this is what he is defending by his attack on matter. What he is attacking when he attacks matter is any attempt to split off, in a sharp way, the objects we sense from the external objects we know through sensation. This makes Berkeley's response to the skeptic a close cousin of the responses of Aristotelians, whatever other differences there may be.**
* Note that this does not require Berkeley's thesis that all ideas (i.e., objects of sensation) are mind-dependent. Berkeley's primary intention, which is to refute skepticism, only requires a plausible defense of (B). Mind-dependence is introduced for a different reason, namely, as an alternative to dependence on an unknown-material-something. You don't have to accept this alternative to accept the basic soundness of Berkeley's anti-skepticism.
** There are, of course, differences. The major difference with regard to skepticism itself, I think, is that Berkeley will want to read (B) in a somewhat stronger way than the Aristotelian. This is simply due to the fact that the Aristotelian allows for abstraction of forms as part of the story of (B), while Berkeley doesn't. They both accept (B), however, and with (B) the battle is largely won -- the only further concern is not losing it again by violating (B) in trying to fill out the details of (B). They also both deny, albeit for very different reasons, premise (4) of the No Good Inference argument; but this denial is not Berkeley's main thrust, and indeed, his rejection of (4) is due to his support for (B).