A judge today blamed greed for the corruption of New York Stock Exchange floor brokers as he ordered prison terms or home detention for six of them snared in the first prosecution of its kind.

U.S. District Judge Jed S. Rakoff handed the stiffest sentence to the president of the now-defunct Oakford Corp., which helped the brokers illegally execute trades ahead of orders from their customers. William Killeen was sentenced to 20 months in prison for his part in the scam engineered in part through Oakford. Killeen, 39, of Colts Neck, N.J., was also fined $50,000.

Oakford vice president Thomas William Bock, 47, was sentenced to 1 1/2 years in prison and fined $50,000.

Floor brokers are paid a commission to conduct trades for client brokerages and their customers. They are not permitted to make trades for themselves or for any account in which they have an interest.

John Savarese, 35, and Mark Savarese, 38, both of Garden City, Edward Mueger, 65, of Port Washington and Thomas Cavallino, 43, of Shrewsbury, N.J., all pleaded guilty earlier this year to unlawfully entering into on-floor purchases and sales of securities without proper customer orders.

The Savarese brothers were each sentenced to four months in prison to be followed by two months of home detention. Both were fined $15,000 as well. Mueger was sentenced to three months in prison and three months of home confinement and fined $15,000.

Cavallino was sentenced to six months of home confinement. The judge spared him a prison term but increased his fine to $100,000 after listening to pleas that he be left at home to care for his son.