# # Start sshd if present. # if [ -x /usr/local/sbin/sshd ]; then # Try to generate missing keys if [ -x /usr/local/bin/ssh-keygen -a ! -f /etc/ssh_host_key ]; then (echo; echo -n " (sshd: generating RSA key)...") >/dev/console /usr/local/bin/ssh-keygen -q -b 1024 \ -f /etc/ssh_host_key -C '' -N '' >/dev/null chmod 600 /etc/ssh_host_key ; chmod 644 /etc/ssh_host_key.pub fi if [ -x /usr/local/bin/ssh-keygen -a ! -f /etc/ssh_host_dsa_key ]; then (echo; echo -n " (sshd: generating DSA key)...") >/dev/console /usr/local/bin/ssh-keygen -q -d -b 1024 \ -f /etc/ssh_host_dsa_key -C '' -N '' >/dev/null chmod 600 /etc/ssh_host_dsa_key ; chmod 644 /etc/ssh_host_dsa_key.pub fi # No keys - then no startup. if [ -f /etc/ssh_host_key -o -f /etc/ssh_host_dsa_key ]; then /usr/local/sbin/sshd & echo -n " sshd" >/dev/console fi fi