forked from 3wordchant/capsul-flask
Compare commits
20 Commits
tests-with
...
tests
Author | SHA1 | Date | |
---|---|---|---|
13b2c05476 | |||
5f9fc1adcf | |||
16ff1b5b26 | |||
8c10f71f58 | |||
66dee4d87a | |||
6a587ac7fc | |||
4e510ebb01 | |||
140870ec35 | |||
2348191990 | |||
5e682cc705 | |||
2b33573890 | |||
da4d28f70c | |||
d833b3df19 | |||
46a40261bb | |||
b108d4c04e | |||
6bd02a660e | |||
8a944104d3 | |||
d4a9f2f40a | |||
7b16606b16 | |||
d9f3e68278 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@ instance/
|
||||
.pytest_cache/
|
||||
.coverage
|
||||
htmlcov/
|
||||
/unittest-log-output.log
|
||||
|
||||
dist/
|
||||
build/
|
||||
|
@ -108,6 +108,8 @@ def detail(id):
|
||||
if vm is None:
|
||||
return abort(404, f"{id} doesn't exist.")
|
||||
|
||||
vm['ssh_username'] = current_app.config['SSH_USERNAME']
|
||||
|
||||
if vm['deleted']:
|
||||
return render_template("capsul-detail.html", vm=vm, delete=True, deleted=True)
|
||||
|
||||
|
@ -23,7 +23,7 @@ def pricing():
|
||||
|
||||
@bp.route("/faq")
|
||||
def faq():
|
||||
return render_template("faq.html")
|
||||
return render_template("faq.html", ssh_username=current_app.config['SSH_USERNAME'])
|
||||
|
||||
@bp.route("/about-ssh")
|
||||
def about_ssh():
|
||||
|
@ -30,6 +30,6 @@ if virsh domuuid "$vmname" | grep -vqE '^[\t\s\n]*$'; then
|
||||
fi
|
||||
|
||||
# this gets the ipv4
|
||||
ipv4="$(virsh domifaddr "$vmname" | awk '/vnet/ {print $4}' | cut -d'/' -f1)"
|
||||
ipv4="$(virsh domifaddr "$vmname" | awk '/ipv4/ {print $4}' | cut -d'/' -f1)"
|
||||
|
||||
echo "$exists $state $ipv4"
|
@ -97,7 +97,7 @@
|
||||
</div>
|
||||
<div class="row justify-start">
|
||||
<label class="align" for="ssh_username">SSH Username</label>
|
||||
<span id="ssh_username">cyberian</span>
|
||||
<span id="ssh_username">{{ vm['ssh_username'] }}</span>
|
||||
</div>
|
||||
<div class="row justify-start">
|
||||
<label class="align" for="ssh_authorized_keys">SSH Authorized Keys</label>
|
||||
|
@ -21,13 +21,13 @@
|
||||
</li>
|
||||
<li>
|
||||
How do I log in?
|
||||
<p>ssh to the ip provided to you using the cyberian user.</p>
|
||||
<pre class='code'>$ ssh cyberian@1.2.3.4</pre>
|
||||
<p>ssh to the ip provided to you using the "{{ ssh_username }}" user.</p>
|
||||
<pre class='code'>$ ssh {{ ssh_username }}@1.2.3.4</pre>
|
||||
<p>For more information, see <a href="/about-ssh">Understanding the Secure Shell Protocol (SSH)</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
How do I change to the root user?
|
||||
<p>The cyberian user has passwordless sudo access by default. This should work:</p>
|
||||
<p>The "{{ ssh_username }}" user has passwordless sudo access by default. This should work:</p>
|
||||
<pre class='code'>
|
||||
# Linux
|
||||
$ sudo su -
|
||||
|
Reference in New Issue
Block a user