While 20 states and the District of Columbia have passed laws allowing the sale of medical and recreational marijuana, its production, sale, and possession remain illegal under federal law. And because the federal government regulates banking transactions, marijuana dealers have been unable to get banks to do business with them.

The rules, issued by the Treasury and Justice Departments, are intended to "move from the shadows the historically covert financial operations of marijuana businesses," said Jennifer Shasky Calvery, director of Treasury's Financial Crimes Enforcement Network.

The Obama administration issued new rules Friday intended to ease the concerns of banks wanting to deal with businesses that legally sell marijuana, something the nation's banks have so far declined to do.

Current rules require banks to notify federal regulators of suspicious activity by their customers, which currently would include any marijuana dealer because of the prohibitions under federal law. Under the new rules, the notices will still be required, but banks that believe a marijuana dealer is reputable will file a "marijuana limited" report.

Under the new regulations, banks wishing to do business with marijuana dealers must verify that they are properly licensed and must gather information about the types of products they sell and the nature of the customers they serve. Banks must also be alert for any signs that the dealers are engaged in improper transactions.

As a result, dealers operate strictly with cash, creating a tempting target for thieves. Treasury Department officials say the revised rules should reduce the dangers associated with conducting an all-cash business.

If a bank believes a dealer is not behaving under guidelines, the bank should file a "marijuana priority" report, which could be based on such factors as greater revenue than local competitors or an inability to demonstrate that revenue is derived exclusively from legal sales.

In the past, bankers have been skeptical that rule changes alone would ease their concerns about doing business with marijuana dealers and have called on Congress to explicitly change federal law.

"This guidance is a set in the right direction, but it's not enough," said Amanda Averch, director of communications at the Colorado Bankers Association. "We don't see that guidance as giving banks a full green light to bank these businesses. We feel the only real and lasting solution is an act of Congress."

(Slideshow: A gallery of medical marijuana)

Jim Pishue, president of the Washington Bankers Association, agrees. Guidelines don't change the law, he said, and it isn't permanent – it can change from administration to administration.

"These guidelines may give some a little bit of confidence, but I don't think it will give them enough to bank these folks," Pishue said.

Bankers aren't really worried about the possibility of going to jail. They fear the stiff penalties federal regulators can impose for violating the law. These include: civil money penalties, fines, cease-and-desist orders or withdrawal of FDIC insurance. They can even also ban someone from working in the banking industry for life.

Congressman Denny Heck (D-Wash) thinks the banking industry will get in the game.

"The reality is that some bankers will do it and once some do, more will. So this is going to happen," Rep. Heck said. "Some will come kicking and screaming, some will come readily, some won't come at all. But we're going to move n this direction because it's the only thing that makes sense."

As Rep. Heck pointed out, some banks and credit unions are already offering banking services to legal marijuana dispensaries "with a wink and a nod" and their ready to come out into the open.

"Every financial institution will have to make its own risk assessment and whether it makes businesses sense," said an administration official. "While it may not reassure every bank, we're proving an opening for those who want to serve this sector."

A Treasury Department official said demand has been especially heavy in Colorado and Washington, where retail sale of marijuana was is now legal under state law.

The Justice Department Friday directed federal prosecutors to focus their resources on suspicious dealers when considering filing charges of money laundering or other offenses against banking transactions by marijuana dealers.

—Reporting by NBC's Pete Williams and CNBC's Herb Weisbaum