Let's suppose Alice said "You should only connect to people you know well", and Bob has to decide how to tell other people about this later. Bob needs to choose between saying...
1: Alice said that you should only connect to people you know well.
2: Alice said that you should only connect to people you knew well.
Both versions are grammatically fine, but in terms of nuanced meaning, the use of Present Tense in #1 implies greater relevance to time of speaking (I mean when Bob is speaking, not Alice). That "greater relevance" would usually be understood to mean that Bob endorses what Alice said, and therefore wants you (whoever he's talking to) to take that advice on board now (it's "current").
Conversely, the use of Past Tense in #2 places the advice more firmly in the past (or in the hypothetical irrealis of If you knew him well you would like him). That's more appropriate if Bob doesn't endorse Alice's advice, because he's introduced a greater "distance" (past => present) in the way he reports what was said.
Arguably one might also be more inclined to use Past Tense if we replace Alice by, say, Plato because the advice was obviously given a very long time ago. But to be honest, I'm not convinced that applies as a justification in and of itself.