summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKasra Bigdeli <[email protected]>2020-05-17 23:33:46 -0400
committerKasra Bigdeli <[email protected]>2020-05-17 23:33:46 -0400
commitea9cfae8b5fb940a2fddf0dd51ff63977a09fcce (patch)
tree35f406b17c18a6f661e472c0e4c364e0092dd8b2
parent7972cc93b93a996d8c53b80c6b976ceed3e59c12 (diff)
downloadcaprover-one-click-apps-ea9cfae8b5fb940a2fddf0dd51ff63977a09fcce.tar.gz
caprover-one-click-apps-ea9cfae8b5fb940a2fddf0dd51ff63977a09fcce.zip
Added SSHD
-rw-r--r--public/v2/apps/sshd.json52
-rw-r--r--public/v2/logos/sshd.pngbin0 -> 7461 bytes
2 files changed, 52 insertions, 0 deletions
diff --git a/public/v2/apps/sshd.json b/public/v2/apps/sshd.json
new file mode 100644
index 0000000..525016d
--- /dev/null
+++ b/public/v2/apps/sshd.json
@@ -0,0 +1,52 @@
+{
+ "captainVersion": "2",
+ "documentation": "Taken from https://docs.docker.com/engine/examples/running_ssh_service/#build-an-eg_sshd-image ",
+ "displayName": "SSH Container",
+ "description": "Just a simple container that has sshd installed so you can SSH directly into this container.",
+ "dockerCompose": {
+ "version": "3.3",
+ "services": {
+ "$$cap_appname": {
+ "dockerfileLines": [
+ "FROM ubuntu:16.04",
+ "RUN apt-get update && apt-get install -y openssh-server",
+ "RUN mkdir /var/run/sshd",
+ "RUN echo 'root:$$cap_sshd_password' | chpasswd",
+ "RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config",
+ "# SSH login fix. Otherwise user is kicked off after login",
+ "RUN sed 's@sessions*requireds*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd",
+ "ENV NOTVISIBLE \"in users profile\"",
+ "RUN echo \"export VISIBLE=now\" >> /etc/profile",
+ "EXPOSE 22",
+ "CMD [\"/usr/sbin/sshd\", \"-D\"]"
+ ],
+ "ports": ["$$cap_sshd_port:22"],
+ "volumes": [
+ "$$cap_appname-data:/data"
+ ],
+ "restart": "always",
+ "environment": {}
+ }
+ }
+ },
+ "instructions": {
+ "start": "The following app sets up an SSHd service in a container that you can use to connect to and inspect other container’s volumes, or to get quick access to a test container.\n\n\nIMPORTANT:\nThis setup uses password login. You can optionally mount your keys and use public/private key to log in.",
+ "end": "The container is built and deployed. You can now connect to this container from your local machine by running the following command: \n\n ssh root@IpAddressOfServer -p $$cap_sshd_port"
+ },
+ "variables": [
+ {
+ "id": "$$cap_sshd_password",
+ "label": "Your SSH root password",
+ "description": "Enter a secure password",
+ "defaultValue": "pAsSwOrD",
+ "validRegex": "/.{8,}/"
+ },
+ {
+ "id": "$$cap_sshd_port",
+ "label": "Your SSH exposed port",
+ "description": "Enter a port number",
+ "defaultValue": "4646",
+ "validRegex": "/^\\d+$/"
+ }
+ ]
+} \ No newline at end of file
diff --git a/public/v2/logos/sshd.png b/public/v2/logos/sshd.png
new file mode 100644
index 0000000..147bd2f
--- /dev/null
+++ b/public/v2/logos/sshd.png
Binary files differ