]>
git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - openssh/sshd-keygen
3 # Create the host keys for the OpenSSH server.
6 # Some functions to make the below more readable
7 KEYGEN
=/usr
/bin
/ssh-keygen
8 RSA1_KEY
=/etc
/ssh
/ssh_host_key
9 RSA_KEY
=/etc
/ssh
/ssh_host_rsa_key
10 DSA_KEY
=/etc
/ssh
/ssh_host_dsa_key
13 if [ ! -s $RSA1_KEY ]; then
15 if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1
-f $RSA1_KEY -C '' -N '' >&/dev
/null
; then
16 chgrp ssh_keys
$RSA1_KEY
18 chmod 644 $RSA1_KEY.pub
19 if [ -x /sbin
/restorecon
]; then
20 /sbin
/restorecon
$RSA1_KEY.pub
29 if [ ! -s $RSA_KEY ]; then
31 if test ! -f $RSA_KEY && $KEYGEN -q -t rsa
-f $RSA_KEY -C '' -N '' >&/dev
/null
; then
32 chgrp ssh_keys
$RSA_KEY
34 chmod 644 $RSA_KEY.pub
35 if [ -x /sbin
/restorecon
]; then
36 /sbin
/restorecon
$RSA_KEY.pub
45 if [ ! -s $DSA_KEY ]; then
47 if test ! -f $DSA_KEY && $KEYGEN -q -t dsa
-f $DSA_KEY -C '' -N '' >&/dev
/null
; then
48 chgrp ssh_keys
$DSA_KEY
50 chmod 644 $DSA_KEY.pub
51 if [ -x /sbin
/restorecon
]; then
52 /sbin
/restorecon
$DSA_KEY.pub