linux - How do I run ssh-keygen so that it overwrites without prompting if a key cert exists? -
so have scenario remote call made target machine. it's possible more 1 call made generate ssh keys, in case script hang requests overwrite (y/n).
is there proper way request non-interactive overwrite (or silently ignore) of keys if found?
there doesn't seem --force or --overwrite option in
man ssh-keygen
that can find. there rationale having function way, or bug should report authors?
any appreciated.
you can work around thusly:
echo -e 'y\n'|ssh-keygen -q -t rsa -n "" -f ~/.ssh/id_rsa
it still output prompt, complete process , overwrite file.
Comments
Post a Comment