Fixed ssh key check code