In an emotional press conference at the apartment of Dr. Andrei Sakharov, one of the key leaders of the Soviet human rights movement, the remaining members of a Moscow dissident group pledged themselves yesterday to continue speaking out despite severe sentences meted out against Anatoly Scharansky and Alexander Ginzburg.

The trials, declared Sakharov, "are a challenge to all foreign governments and anyone working for human rights. If we don't weaken our efforts, the authorities will have to soften their attacks." Sakharov appealed to U.N. Secretary General Kurt Walkdheim to speak out in defense of the two men.

The afternoon session brought together once again a combination the government is intent upon suppressing - human rights advocates, Jewish activists, and foreign correspondents, whose reports in the West have tarnished the Kremlin's image.

Meanwhile, the Soviet government bitterly condemned Scharansky and warned that President Carter's human rights campaign was leading toward Soviet-American confrontation.

An authoritative commentary in Soviet newspapers lumped Scharansky with Anatoly Filatov, who was sentenced Friday to be shot for espionage. It described them as "criminals, traitors to the homeland and spies."

A separate report in the communist party newspaper Pravda warned the United States, saying: "The campaign of interference in the internal affairs of socialist countries . . . is becoming an uncontrollable process, a tide which is carrying those who swim in it toward the cliffs of confrontation," it said.

More than 40 people crowded into Sakharov's small study to hear Ginzburg's wife and Scharansky's brother tell of the two trials, which ended last week with guilty verdicts and harsh prison terms for both men.

There was no talk at the meeting of the reports from Carter's entourage in Bonn of possible negotiations to swap Ginsburg and Scharansky for two alleged Soviet spies facing trial in the United States.

"The brutal sentences are tragedies and a tragedy for the whole movement," declared Sakharov's wife, Elena Bonner, an early member of the Moscow group set up in 1976 to check Soviet compliance with international human rights guarantees the Kremlin signed in 1975 as part of the Helsinki accord on European security and cooperation.

Ginzburg was convicted Thursday of anti-Soviet agitation and sentenced to eight years hard labor. Scharansky was convicted Friday ad sentenced to 13 years prison and hard labor.

Ginzburg cofounded the Moscow monitoring group with Yuri Orlov. Scharansky, a computer programmer who had been refused permission on security grounds to emigrate to Israel, was an active member. All three have now been convicted of harming the Soviet state. Orlov in May was given 12 years in labor camps and internal exile.

Of 44 human rights activists and Jews refused exit visas to Israel who then began speaking out, 15 have since have been convicted or await trial. Many others have been intimidated by the secret police into silence or forced to emigrate against their wills as part of the 18-month-old government crack-down on dissenters.

But even as the Moscow group yesterday acknowledged the impact of the government's campaign, they announced a new member, physicist Sergei Polikanov, a member of the Soviet Academy of Sciences. He was expelled from the Communist Party several months ago after denouncing as unwarranted a government ban on his attempts to spend a few weeks in Geneva conducting experiments in his field with Western scientists.

Sakharov, who as a young man helped design the Soviet hydrogen bomb and then turned against his work and became an outspoken human rights advocate and 1975 Nobel Peace Prize winner, asserted that "the question of international security is connected with human rights. International peace cannot be achieved when there is no defense of human freedoms. We must defend all prisoners of conscience."

He addressed himself especially to Amnesty International, the London based group that investigates alleged political imprisonment and abuse.

The dissidents, numbering more than 25 and including Alexander Lerner, a mathematician; Sofia Kalistratova, a lawyer; Naum Meiman, a retired mathematician, and Tatiana Osipova, a computer specialist, derided official characterizations of Ginzburg and Scharansky as immoral men.

These reports, reprinted by most major Soviet newspapers yesterday and carried on television and radio, were to "intimidate Jews and activate anti-Semitic feelings," Sakharov declared. He compared the Scharansky case to that of Alfred Dreyfus, the 19th century jewish French army captain whose fabricated treason conviction and later pardon convulsed France and brought deep reforms to its politics.

Arina Ginzburg, who was expelled from her husband's trial in Kaluga last Tuesday after calling a witness a liar, said she met with her husband after the trial for an hour. He has been jailed since February 1977 and is in poor health.

They sat in a small room in Kaluga jail, separated from each other by a thick wall, able to see each other through a small window and speak through telephones.

Jailers eavesdropping on the conversation interrupted with cries of "that's forbidden!," she said, when they tried to talk about his possible plans to appeal the conviction, or such questions as which friends should receive his carpentry tools. They could talk only of "children and family matters," she said.

When Leonid Scharansky recounted his brother's final statement before sentencing, he paused, voice strained, murmuring, "I'm sorry. Every time I repeat these words I cry."