]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/sshd
2 # Begin $rc_base/init.d/sshd
4 # Based on sysklogd script from LFS-3.1 and earlier.
5 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
7 #$LastChangedBy: bdubbs $
8 #$Date: 2006-04-15 17:34:16 -0500 (Sat, 15 Apr 2006) $
15 if [ ! -e /etc
/ssh
/ssh_host_rsa_key
]; then
16 echo "Generating SSH Keys"
17 ssh-keygen
-qf /etc
/ssh
/ssh_host_rsa_key
-N ''
18 ssh-keygen
-qf /etc
/ssh
/ssh_host_key
-N '' -t rsa1
19 ssh-keygen
-qf /etc
/ssh
/ssh_host_dsa_key
-N '' -t dsa
22 [ -e "/var/ipfire/remote/enablessh" ] ||
exit 0 # SSH is not enabled
23 boot_mesg
"Starting SSH Server..."
24 # Also prevent ssh from being killed by out of memory conditions
25 loadproc
/usr
/sbin
/sshd
27 echo "-16" >/proc
/`cat /var/run/sshd.pid`/oom_adj
31 boot_mesg
"Stopping SSH Server..."
32 killproc
/usr
/sbin
/sshd
36 boot_mesg
"Reloading SSH Server..."
37 reloadproc
/usr
/sbin
/sshd
47 statusproc
/usr
/sbin
/sshd
51 echo "Usage: $0 {start|stop|reload|restart|status}"
56 # End $rc_base/init.d/sshd