12 lines
220 B
Bash
12 lines
220 B
Bash
|
#!/bin/sh -eu
|
|||
|
|
|||
|
N=${1} # how many keys to create
|
|||
|
|
|||
|
mkdir -p keypairs
|
|||
|
|
|||
|
for i in $(seq $N);
|
|||
|
do
|
|||
|
keyfile="../keypairs/user${i}"
|
|||
|
[ -s $keyfile ] || ssh-keygen -q -t ed25519 -P "" -C "user${i}@packerlab" -f $keyfile
|
|||
|
done
|