diff options
author | startxfr <clarue@startx.fr> | 2015-11-28 07:54:53 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2015-11-28 07:54:53 +0100 |
commit | 3f5e92790bd7360e3454541e7bced410c4532c5f (patch) | |
tree | e357881c9ab6f7e72e257caeb19c31bc577c0305 /Services/ssh/sx/sshd.sh | |
parent | 40c98f14450ab14a5b5948ad97ee27d310a867f2 (diff) | |
download | phpmyadmin-3f5e92790bd7360e3454541e7bced410c4532c5f.tar.gz phpmyadmin-3f5e92790bd7360e3454541e7bced410c4532c5f.tar.bz2 phpmyadmin-3f5e92790bd7360e3454541e7bced410c4532c5f.tar.xz phpmyadmin-3f5e92790bd7360e3454541e7bced410c4532c5f.zip |
delete ssh service and adding limits in tested services
Diffstat (limited to 'Services/ssh/sx/sshd.sh')
-rw-r--r-- | Services/ssh/sx/sshd.sh | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/Services/ssh/sx/sshd.sh b/Services/ssh/sx/sshd.sh deleted file mode 100644 index 937ef1a..0000000 --- a/Services/ssh/sx/sshd.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -export TERM=dumb - -# Begin configuration before starting daemonized process -# and start generating host keys -function begin_config { - echo "=> Begin sshd configuration for host $HOSTNAME" - mkdir -p /var/run/sshd -} - -# End configuration process just before starting daemon -function end_config { - echo "=> End sshd configuration ..." -} - -# Perform installation of ssh keys -function install_host_keys { - local mail=$1; - if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then - echo "===> Installing sshd host keys for $mail ..." - generate_host_key rsa $mail /etc/ssh/ssh_host_rsa_key - generate_host_key ecdsa $mail /etc/ssh/ssh_host_ecdsa_key - else - echo "===> sshd host key found at /etc/ssh/ssh_host_rsa_key ..." - fi; -} - - -# generate key and store -function generate_host_key { - local format=$1; local mail=$2; local dest=$3; - echo "===> Generating $format sshd key for $mail recorded in $dest" - ssh-keygen -t $format -C $mail -f $dest -N '' -} - -# Start the sshd server in background. Used to perform config -# against the database structure such as user creation -function start_server { - echo "===> Starting sshd server ..." - /usr/sbin/sshd & - sleep 8 -} - -# Stop the sshd server running in background. -function stop_server { - echo "===> Stopping sshd server ..." - killall sshd - sleep 8 -} - -# Start the sshd server as a deamon and execute it inside -# the running shell -function start_daemon { - echo "=> Starting sshd daemon ..." - exec /usr/sbin/sshd -D -} - - -if [[ "$0" == *"sshd.sh" && ! $1 = "" ]];then - eval "$@"; -fi
\ No newline at end of file |