6 # Make sure the ssh-keygen progam exists
7 [ -f /usr
/bin
/ssh-keygen
] ||
exit 0
9 # Check for the SSH1 RSA key
10 if [ ! -f /etc
/ssh_host_key
] ; then
11 echo Generating RSA Key...
12 /usr
/bin
/ssh-keygen
-t rsa1
-f /etc
/ssh_host_key
-C '' -N ''
15 # Check for the SSH2 RSA key
16 if [ ! -f /etc
/ssh_host_rsa_key
] ; then
17 echo Generating RSA Key...
18 /usr
/bin
/ssh-keygen
-t rsa
-f /etc
/ssh_host_rsa_key
-C '' -N ''
21 # Check for the SSH2 DSA key
22 if [ ! -f /etc
/ssh_host_dsa_key
] ; then
23 echo Generating DSA Key...
24 echo THIS CAN TAKE A MINUTE OR TWO DEPENDING ON YOUR PROCESSOR
!
26 /usr
/bin
/ssh-keygen
-t dsa
-f /etc
/ssh_host_dsa_key
-C '' -N ''
32 echo -n "Starting sshd: "
38 echo -n "Stopping sshd: "
59 echo $
"Usage: $0 {start|stop|restart}"