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 | |
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
-rw-r--r-- | Services/ssh/.ssh/authorized_keys | 2 | ||||
-rw-r--r-- | Services/ssh/Dockerfile | 16 | ||||
-rw-r--r-- | Services/ssh/README.md | 40 | ||||
-rw-r--r-- | Services/ssh/sx/sshd.sh | 62 | ||||
-rw-r--r-- | Services/ssh/sx/sshd_run.sh | 8 |
5 files changed, 0 insertions, 128 deletions
diff --git a/Services/ssh/.ssh/authorized_keys b/Services/ssh/.ssh/authorized_keys deleted file mode 100644 index ef8ed1e..0000000 --- a/Services/ssh/.ssh/authorized_keys +++ /dev/null @@ -1,2 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7pCBSddCIi/lOH+z6KdkyS/JLGFCQTH8u+JyHoqUj8X9nVty6xBWNTdYDq5/0vUFLUtOxMlX9noV8JddA/XFAWpGmQU8KDq3dcqjWJXZ4NUiXwDrysP7JryVXBDidZC16ObAGw58a2/5BiXs+WGoSkkNUFZN3rbIaurrth1ODD67YZiL+Jzts2KyJednn8bM+rmmMvvhKFzV4QnmgbYF0OvdAucaMTWrdmkuY/VVse1l2LxxEx2IFz/q6dxH8uuQUGXjESXlHw5I0Fi0lhMDQ9M8xqI9AKeu87R+UPKxyOZjwGpz5Fui5yKuJOHsjY57Mze5wTOnu+YdVxJOwpJhN cl@startx.fr -ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMHb1BVc0//5yjm35TR26UIX9Gk1omNl3Z0OZTm36ZsohzXLgHWxtI+eUofI0rw8k/PeCZMoaQK2MlIijuL7eMM= cl@alcorecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKBbjgNez6Bn/ngVpW0J/KBF42J2lcdyFWbYmnTCdkoUC7qks9Uy3WgJqqhkCIfIvm4jOOZuKJCD2WSPYD2TB00= cl@startx.fr diff --git a/Services/ssh/Dockerfile b/Services/ssh/Dockerfile deleted file mode 100644 index 7a582b1..0000000 --- a/Services/ssh/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM startx/fedora -MAINTAINER Christophe LARUE <dev@startx.fr> - -# Install packages and set up sshd -RUN dnf -y update \ - && dnf -y install openssh-server \ - && dnf clean all -# Copy startx toolkit -COPY sx/* /sx/ -# Copy ssh keys -COPY .ssh/authorized_keys /root/.ssh/authorized_keys -RUN chmod ug+rx /sx/sshd* - - -EXPOSE 22 -CMD ["/sx/sshd_run.sh"]
\ No newline at end of file diff --git a/Services/ssh/README.md b/Services/ssh/README.md deleted file mode 100644 index b04d68e..0000000 --- a/Services/ssh/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# STARTX Services docker-images : SSH Server - -Container running sshd daemon under a fedora server. You can add your own list of autorized keys - -## Running from docker registry - - docker run -d -p 22022:22 --name="ssh" startx/sv-ssh - -## Build and run from local Dockerfile -### Building docker image -Copy sources in your docker host - - mkdir startx-docker-images; - cd startx-docker-images; - git clone https://github.com/startxfr/docker-images.git . - -You can overwrite /root/.ssh/autorized_keys with your own list of autorized keys. - -Build the container - - docker build -t sv-ssh Services/ssh/ - -### Running local image - - docker run -d -p 22022:22 --name="ssh" sv-ssh - -## Accessing server -access to the running server - - ssh -p 22022 root@localhost - -access to the container itself - - docker exec -it ssh /bin/bash - -## Related Resources -* [Sources files](https://github.com/startxfr/docker-images/tree/master/Services/ssh) -* [Github STARTX profile](https://github.com/startxfr/docker-images) -* [Docker registry for this container](https://registry.hub.docker.com/u/startx/sv-ssh/) -* [Docker registry for Fedora](https://registry.hub.docker.com/u/fedora/) 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 diff --git a/Services/ssh/sx/sshd_run.sh b/Services/ssh/sx/sshd_run.sh deleted file mode 100644 index 2aec330..0000000 --- a/Services/ssh/sx/sshd_run.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -source /sx/sshd.sh - -begin_config -install_host_keys "root@localhost" -end_config - -start_daemon
\ No newline at end of file |