refact ssh shell