The House voted yesterday to eliminate all miliatry assistance to Panama by adopting an amendment striking it from a two-year, $1.7 billion military aid bill sent to the Senate.

While the money for Panama amounted to only $2.5 million in military credit sales, the vote of 272 to 117 seemed to pressage deep trouble in the House for legislation to implement the Panama Canal treaties.

The vote eased the pressure on the Merchant Marine Committee to compromise with the administration on the implementing legislation and may mean any bill will have difficulty passingw without heavy administration lobbying, according to a well-placed congressional source.

Rep. Robert Bauman (R-Md.), who offered the amendment, said the funds should be withheld until the markup of Panama Canal legislation was finished. He said there was an indication Panama would receive from $65 million to $70 million in canal tolls. Until the markup is concluded, Bauman said, Panama could use the toll money to provide the assistance, which he said would go to Panama's military police.

Others argued that the United States should not aid a dictatorship and that it was a violation of law to use military aid funds for police forces. They also cited allegations of Panamanian human rights violations.

The Foreign Affairs Committee had already cut $2.5 million in funds for Panama from the bill and the administration was hoping to restore it on the floor.However, after the Bauman amendment was adopted, no attempt was made to restore the funds.

For the first time, the Foreign Affairs Committee brought out a two-year military assistance authorization bill with $880 million for fiscal 1980 and $865 million for fiscal 1981. An effort by Rep. Gerry Studds (D-Mass.) to reduce it to the usual one-year funding was defeated.

The bill bars any funds for Jordan unless the president certifies the country is acting in good faith to achieve progress toward a Middle East peace settlement. Though the administration has said it is not pleased with that provision, it did not try to defeat it on the House side.

No funds to implement the Egyptian-Israeli peace treaty just signed are in the bill. The administration is expected to ask later for a supplemental bill including those funds.

The Foreign Affairs Committee had also canceled Zaire's eligibility for $10.5 million in foreign military credit sales, on the grounds that Zaire should get no military aid until political reforms have been achieved.