I get a "bad login" message when trying to play multiplayer [duplicate]

When I try to play multiplayer I type in the only server I know, which the game says was right, then click Play and it loads. Then it says Can't connect to server: bad log in. How can I fix this?


You cannot login to a server that has the online-mode set to true in server.properties when you're in offline mode, sorry. Some servers allow offline-mode connections, but this is rare since it is open to those who pirated the game and you could pretend to have any username.


You will get a “Bad Login” error from a specific server if that server can't reach minecraft.net to verify your account.

This means that if the server has a hard time connecting to minecraft.net (either because minecraft.net has just gone down, or because the server has an unreliable network route to minecraft.net) even if you have no problem connecting to minecraft.net to login to your account initially, then you will get intermittent "Bad Login" errors from the server that's having network problems.