From 318e24a093ce8ef682bae49d9293a2710d51cef7 Mon Sep 17 00:00:00 2001 From: forest Date: Fri, 11 Feb 2022 17:15:56 -0600 Subject: [PATCH] style changes and introducing /add-ssh-key-to-existing-capsul --- capsulflask/landing.py | 5 ++ capsulflask/static/style.css | 17 ++++++- capsulflask/templates/about-ssh.html | 14 +++--- .../add-ssh-key-to-existing-capsul.html | 48 +++++++++++++++++++ capsulflask/templates/capsul-detail.html | 7 +-- capsulflask/templates/changelog.html | 12 +++++ capsulflask/templates/faq.html | 28 +++++------ capsulflask/templates/ssh-public-keys.html | 12 ++++- .../templates/troubleshooting-ssh.html | 13 +++-- 9 files changed, 126 insertions(+), 30 deletions(-) create mode 100644 capsulflask/templates/add-ssh-key-to-existing-capsul.html diff --git a/capsulflask/landing.py b/capsulflask/landing.py index 299c405..7b113af 100644 --- a/capsulflask/landing.py +++ b/capsulflask/landing.py @@ -32,6 +32,11 @@ def about_ssh(): def troubleshooting_ssh(): return render_template("troubleshooting-ssh.html") +@bp.route("/add-ssh-key-to-existing-capsul") +def add_ssh_key_to_existing_capsul(): + return render_template("add-ssh-key-to-existing-capsul.html") + + @bp.route("/changelog") def changelog(): return render_template("changelog.html") diff --git a/capsulflask/static/style.css b/capsulflask/static/style.css index 2877e22..c82e063 100644 --- a/capsulflask/static/style.css +++ b/capsulflask/static/style.css @@ -62,6 +62,13 @@ h1, h2, h3, h4, h5 { text-shadow: 2px 2px 0px #0007; } +blockquote { + margin: 0; + padding-left: 2em; + border-left: 2px solid #bdc7b844; +} + + main { border: 1px dashed #bdc7b8; padding: 1rem; @@ -217,11 +224,17 @@ ul li, ol li { margin-left: 1.2rem; } -.long-form p, .long-form li { +.long-form p, +.long-form li, +.long-form blockquote { line-height: 2em; } -.long-form p .code, .long-form li .code{ + +.long-form p .code, +.long-form li .code, +.long-form blockquote .code +{ line-height: 1em; padding: 5px; padding-top: 3px; diff --git a/capsulflask/templates/about-ssh.html b/capsulflask/templates/about-ssh.html index 7545ccc..3ec2835 100644 --- a/capsulflask/templates/about-ssh.html +++ b/capsulflask/templates/about-ssh.html @@ -187,12 +187,14 @@ in a file ~/.ssh/known_hosts.

-

- (the tilde ~ here represents the user's home directory, - /home/username on linux, - C:\Users\username on Windows, and - /Users/username on MacOS). -

+
+ ℹ️ INFO: The tilde ~ here represents the user's home directory, + +

Also, note that as the .ssh folder's name starts with a period, it is a "hidden" folder. diff --git a/capsulflask/templates/add-ssh-key-to-existing-capsul.html b/capsulflask/templates/add-ssh-key-to-existing-capsul.html new file mode 100644 index 0000000..72b35a4 --- /dev/null +++ b/capsulflask/templates/add-ssh-key-to-existing-capsul.html @@ -0,0 +1,48 @@ +{% extends 'base.html' %} + +{% block title %}Add New SSH Key{% endblock %} + +{% block content %} +

Add a New SSH Key to an Existing Capsul

+{% endblock %} + +{% block subcontent %} +
+

+ We don't offer this feature in the capsul.org web console, and we never will. +

+

+ Why? See the FAQ on recovery: +

+
+ Can you recover my passwords/insert new keys? +

Can we? Technically yes. Will we? No, never. It would violate the trust that our users have in us. + We have no interest in touching client VMs after they're running. + We promise to keep your machines running smoothly. + If you lose access to your VM, that's on you.

+
+

+ If we built this feature, that would represent an additional security risk: anyone who can log into your capsul account + or somehow exploit the capsul web application would be able to then log into your Capsul(s). +

+

+ None of the big name cloud service providers offer this feature out of the box either, presumably for similar reasons. +

+

+ So if you want to add a new key to the list of authorized ssh public keys on your capsul, you will have to do it manually: + Just edit the + ~/.ssh/authorized_keys + file on your capsul. You would paste in each additional ssh public key as a new line in that file. +

+
+ ℹ️ INFO: The tilde ~ here represents the user's home directory, so + /home/cyberian/.ssh/authorized_keys for the default user on your capsul. +
+ + + +
+{% endblock %} + +{% block pagesource %}/templates/about-ssh.html{% endblock %} + diff --git a/capsulflask/templates/capsul-detail.html b/capsulflask/templates/capsul-detail.html index 2d7600c..15942d0 100644 --- a/capsulflask/templates/capsul-detail.html +++ b/capsulflask/templates/capsul-detail.html @@ -112,6 +112,7 @@
{{ vm['ssh_authorized_keys'] }} +     [ Add Another... ]
@@ -120,20 +121,20 @@
- +
{% if vm['state'] == 'crashed' or vm['state'] == 'stopped' %}
- +
{% endif %} {% if vm['state'] != 'stopped' %}
- +
{% endif %} diff --git a/capsulflask/templates/changelog.html b/capsulflask/templates/changelog.html index 60e4665..8f4ecaa 100644 --- a/capsulflask/templates/changelog.html +++ b/capsulflask/templates/changelog.html @@ -8,6 +8,18 @@ {% block subcontent %}