Skip to content

Instantly share code, notes, and snippets.



Last active Sep 23, 2018
What would you like to do?
Verify ssh keys exist || create new ones without password
#!/usr/bin/env bash
# check if ssh keys exist else create keys with no password automatically no prompting, ideal for shell scripts and automation
if [ -f $HOME/.ssh/id_rsa ]; then
echo rsa key installed
ssh-keygen -f /root/.ssh/id_rsa -t rsa -N ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment