Ticket #799: openssh.sh

File openssh.sh, 585 bytes (added by charlie@…, 21 years ago)

files/openssh.sh

Line 
1#!/bin/sh
2# $Id: $
3# also from fink
4if [ -f "__PREFIX/sbin/sshd" ]; then
5
6        if [ ! -f "__PREFIX/etc/ssh/ssh_host_key" ]; then
7                __PREFIX/bin/ssh-keygen -t rsa1 -f \
8                        __PREFIX/etc/ssh/ssh_host_key -N "" -C `hostname`
9        fi
10        if [ ! -f __PREFIX/etc/ssh/ssh_host_dsa_key ]; then
11                __PREFIX/bin/ssh-keygen -t dsa -f \
12                        __PREFIX/etc/ssh/ssh_host_dsa_key -N "" -C `hostname`
13        fi
14        if [ ! -f __PREFIX/etc/ssh/ssh_host_rsa_key ]; then
15                __PREFIX/bin/ssh-keygen -t rsa -f \
16                        __PREFIX/etc/ssh/ssh_host_rsa_key -N "" -C `hostname`
17        fi
18
19        echo "starting OpenSSH Server .."
20        __PREFIX/sbin/sshd
21
22fi