condition for ssh 1022

The original version can't be run again and again.