ssh-keygen automation
For a while I’ve wondered how to run ssh-keygen on a machine without user input, I’ve wanted to do this when deploying new machines in a CI/CD pipeline where I can’t answer ssh-keygen’s command line questions. It turns out to be so simple!
1
yes y | ssh-keygen -t rsa -N '' -f /tmp/keys