Joseph Teitelbaum, a key government witness in the FBI's "Unirac" investigation of crime along the Florida waterfront, filed suit against Attorney General William French Smith in U.S. District Court here this week to force the Justice Department to continue to provide protection for him.

Teitelbaum and his family have been protected by the U.S. Marshal Service and government-financed private guards since 1977, after he spent about 15 months working under cover for the FBI. A number of shipping officials and union officials from the International Longshoremen's Association were convicted of racketeering in 1979, but many are still free pending appeals.

Hamilton P. Fox, Teitelbaum's lawyer, said the Justice Department had promised his client protection until six months after the appeals were finished and the defendants jailed. An affidavit from Raymond Maria, an FBI agent who worked with Teitelbaum, confirmed the promise of protection through the appeals phase.

But because of the expense, the Justice Department has attempted several times to force Teitelbaum to enter the Witness Protection Program.

Teitelbaum, who still works in the Miami shipping business, has resisted because he does not want to give up his home, friends, family and business to move to another part of the country and assume a new identity, as the witness program involves.

Critics have described major problems in providing acceptable jobs, identification and background stories for relocated witnesses.

Howard Safir, who heads the Witness Protection Program, testified before a Senate committee 16 months ago that the program is not geared to non-criminals who help the government. "This program is a last resort. Witnesses should enter only when there is no alternative...," he said. "Any private citizen...would find considerable trauma because we cannot replace his house, we cannot replace his car, we cannot replace his credit background."

In an affidavit, Teitelbaum said, "I have always taken the position that I should not be forced to run away because I have testified for the government and that it is the government's responsibility to protect me."

Government funding for Teitelbaum's protection had been scheduled to run out next Tuesday, but Fox said the department has agreed to protect him for an additional two months while the lawsuit is being decided.