Refactored to check if SSH key exists, in the rare event that it has stopped existing sometime during the transfer