collect and raise rc of ssh-keygen if non-zero

%x[] does not raise an exception if the return code is non-zero. This must be done explicitly.