If anyone comes to you and does not bring this teaching, do not take them into your house or welcome them.Anyone who welcomes them shares in their wicked work (2 John 1:10-11).
While showing hospitality is a Christian virtue (Romans 12:13), it is clear from Scripture that hospitality must not be shown to everyone. Paul writes that Christians must not show hospitality to unrepentant Christians:
But now I am writing to you that you must not associate with anyone who claims to be a brother or sister but is sexually immoral or greedy, an idolater or slanderer, a drunkard or swindler. Do not even eat with such people (1 Corinthians 5:11).
Paul is speaking not of unbelievers but believers here (1 Corinthians 5:9-10; 12-13), namely, believers that are unrepentant in their sinful behavior. He writes that the members of the church should have no association with such people. And it is not because they are sinful, but it is because they are unrepentant. For in 2 Corinthians, after the offending person has expressed sorrow over their sin, it appears that Paul is then encouraging the church to receive him back into their fellowship:
The punishment inflicted on him by the majority is sufficient. Now instead, you ought to forgive and comfort him, so that he will not be overwhelmed by excessive sorrow. I urge you, therefore, to reaffirm your love for him (2 Corinthians 2:6-8).
Now, John addresses a different group. He writes that Christians must not show hospitality to those that teach false doctrines in the church:
I say this because many deceivers, who do not acknowledge Jesus Christ as coming in the flesh, have gone out into the world. Any such person is the deceiver and the antichrist. Watch out that you do not lose what we have worked for, but that you may be rewarded fully. Anyone who runs ahead and does not continue in the teaching of Christ does not have God; whoever continues in the teaching has both the Father and the Son. If anyone comes to you and does not bring this teaching, do not take them into your house or welcome them. Anyone who welcomes them shares in their wicked work. (2 John 1:7-11).
This is perhaps a more serious warning. Showing hospitality to false teachers can destroy the fruit of their faithful work in Christ. John writes that in showing them hospitality, they may be inadvertantly sharing "in their wicked work."
Some have used this admonition to refuse welcome to Jehovah's Witnesses, Mormons, and other cults into their homes. Generally speaking, this is probably a right application of this text. Unless you are well-versed in the Scriptures, inviting such people into your homes may only be inviting confusion and trouble.