Skip to content
Snippets Groups Projects
Commit bcfb7f21 authored by Josep Virgili Llop's avatar Josep Virgili Llop
Browse files

Script to generate ssh keys.

parent c9a5c630
No related branches found
No related tags found
No related merge requests found
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment