ssh: fix deadlock

The code was taking locks in the wrong order.

Fixes golang/go#3570.

R=fullung
CC=golang-dev
https://golang.org/cl/6123058
1 file changed