Skip to content

Commit

Permalink
generate ed25519 keys for users instead of rsa
Browse files Browse the repository at this point in the history
  • Loading branch information
martbhell committed Mar 14, 2016
1 parent 0cd8d8c commit 618aebf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions files/createkeys.csh
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ if ( -w $HOME ) then
chmod 700 $HOME/.ssh
endif

if ( ! -f $HOME/.ssh/id_rsa ) then
if ( ! -f $HOME/.ssh/id_ed25519 ) then
#Create the user SSH keys if they're missing
echo "This seems to be your first login"
echo "SSH keys will be created for you so you can ssh in the cluster"
ssh-keygen -t rsa -f $HOME/.ssh/id_rsa -N ""
ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 -N ""

if ( $status != 0 ) then
echo "Could not create ssh keys. Please contact your local admin" >&2
exit 1
endif

cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
cat $HOME/.ssh/id_ed25519.pub >> $HOME/.ssh/authorized_keys
chmod 644 $HOME/.ssh/authorized_keys
echo "So! That didn't take too long, did it?"
endif
Expand Down

0 comments on commit 618aebf

Please sign in to comment.