add cleanup and reboot check

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
some sshd cleanup

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>