#!/bin/bash #Get email echo "Enter your email" read email #Create folder pushd ~/Documents mkdir ssh_keys pushd ssh_keys #Generate key ssh-keygen -t rsa -C "$email" -b 4096 -f gitlab_key #Get the key into the .ssh/config mkdir ~/.ssh printf "Host gitlab.nps.edu\n IdentityFile ~/Documents/ssh_keys/gitlab_key" > ~/.ssh/config #Copy printf "\n\nThe public key is:\n\n" cat gitlab_key.pub