-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkeygen.sh
More file actions
19 lines (13 loc) · 746 Bytes
/
keygen.sh
File metadata and controls
19 lines (13 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
# dsa
(mkfifo key key.pub && cat key key.pub &) ; echo "y" | ssh-keygen -t dsa -C "openssh docker image public dsa key" -f key -q -N "" &>/dev/null ; rm key key.pub
# ecdsa
(mkfifo key key.pub && cat key key.pub &) ; echo "y" | ssh-keygen -t ecdsa -C "openssh docker image public ecdsa key" -f key -q -N "" &>/dev/null ; rm key key.pub
# ed25519
(mkfifo key key.pub && cat key key.pub &) ; echo "y" | ssh-keygen -t ed25519 -C "openssh docker image public ed25519 key" -f key -q -N "" &>/dev/null ; rm key key.pub
# rsa
(mkfifo key key.pub && cat key key.pub &) ; echo "y" | ssh-keygen -t rsa -C "openssh docker image public rsa key" -f key -q -N "" &>/dev/null ; rm key key.pub
exit 0