Terry Childs, the ex-network admin accused of holding San Francisco's computer network to ransom, is suing the city for $3m.
Childs, who has been in prison since July and is still awaiting trial, wants compensation for lost wages, damages and emotional distress caused by what he claims was his wrongful arrest and imprisonment.
He is seeking $1m for lost wages and benefits, $1m for emotional distress, $500,000 in "special damages" and $500,000 to pay off his lawyer.
San Francisco is seeking damages from Childs to recover the costs it claims were incurred by his actions.
Childs was suspended from work in July 2008 and refused to hand over passwords, leaving officials shut out of the city's wide area network.
San Francisco mayor Gavin Newsom visited Childs in prison and convinced him to hand over the passwords.
Childs, 43, is due back in court on 13 February. His lawyer has filed to dismiss three charges as too vague, the SF Examiner reports. ®