Terry Childs was convicted in April of violating California's hacking laws after he refused to hand over administrative control to the city's FiberWAN network in July 2008.
He was sentenced Friday by Judge Teri Jackson, according to Erica Derryck, a spokeswoman for the San Francisco district attorney's office.
Although the city's network continued to run during the 12 days that Childs refused to hand over control, jurors found that by denying the city the administrative control to its own network, he had violated state law.
Childs defended his actions during a long court trial, saying that he was only doing his job, and that his supervisor, Department of Technology and Information Services Chief Operations Officer Richard Robinson, was unqualified to have access to the passwords. Childs eventually handed over the passwords to San Francisco Mayor Gavin Newsom.
Prosecutors characterized the former network administrator as a power hungry control freak who couldn't be managed.