#!/bin/bash set -e ################################################################################### # This script uses yes to automatically answer 'y' to all prompts from ssh-keygen, # effectively accepting the defaults. # The options -t rsa specify the RSA key type, -b 2048 sets the key size to 2048 bits, # -f ~/.ssh/id_rsa specifies the output file, # -q runs in quiet mode, # and -N "" sets an empty passphrase for the private key. ##################################################################################### yes y | ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -q -N ""