Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
new ssh host keys with "yes" confirmation
# v--automatic yes
yes | ssh-keygen -q -t ed25519 -N '' -f /etc/ssh/ssh_host_ed25519_key
yes | ssh-keygen -q -t rsa -b 2048 -N '' -f /etc/ssh/ssh_host_rsa_key
# what bits do you want? ---^
@tcrowe

This comment has been minimized.

Copy link
Owner Author

commented Feb 6, 2019

If the file exists it will ask for a confirmation. Piping yes | to ssh-keygen confirms the overwrite. (y/n)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.