"As of June 17, 2009, Pidgin users are having trouble connecting to Yahoo! IM accounts. Here is a summary of the problem:
Yahoo! appears to be upgrading their servers to a new version of their software. This new version requires a new authentication method. The latest version of Pidgin, 2.5.6, does not support this new authentication method.
The domain name that is used to connect to Yahoo! servers is "scs.msg.yahoo.com". This domain name is actually mapped to multiple servers. Some of these servers have been upgraded, while others haven't. As a result, you may see intermittent failures, or you may fail every time, while your neighbor logs in successfully. It's effectively a roll of the dice."
The following address appear to work, just paste the following line in the "Pager server" field...
Click on this link for Additional Information
For ubuntu users,this page might help you: