added condition to add ssh key to agent