summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/sources/openwrt/ipkg/openssh/openssh.server.postinst
blob: 16d2bf4d7641458012f5f75ff7ca708b156a6074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# Check for the SSH1 RSA key
if [ ! -f /etc/ssh_host_key ] ; then
	echo Generating RSA Key...
	/usr/bin/ssh-keygen -t rsa1 -f /etc/ssh_host_key -C '' -N ''
fi

# Check for the SSH2 RSA key
if [ ! -f /etc/ssh_host_rsa_key ] ; then
	echo Generating RSA Key...
	/usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -C '' -N ''
fi

# Check for the SSH2 DSA key
if [ ! -f /etc/ssh_host_dsa_key ] ; then
	echo "Generating DSA Key... (Takes a few minutes)"
        /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N ''
fi