Compare commits
	
		
			4 Commits
		
	
	
		
			5f868de9cc
			...
			yolocolo
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 7ae5071cef | |||
| d4a9f2f40a | |||
| 0ae55712ac | |||
| 8634cda388 | 
| @ -58,6 +58,7 @@ app.config.from_mapping( | |||||||
|   LOG_LEVEL=os.environ.get("LOG_LEVEL", default="INFO"), |   LOG_LEVEL=os.environ.get("LOG_LEVEL", default="INFO"), | ||||||
|   SPOKE_HOST_ID=os.environ.get("SPOKE_HOST_ID", default="baikal"), |   SPOKE_HOST_ID=os.environ.get("SPOKE_HOST_ID", default="baikal"), | ||||||
|   SPOKE_HOST_TOKEN=os.environ.get("SPOKE_HOST_TOKEN", default="changeme"), |   SPOKE_HOST_TOKEN=os.environ.get("SPOKE_HOST_TOKEN", default="changeme"), | ||||||
|  |   SSH_USERNAME=os.environ.get("SSH_USERNAME", default="cyberian"), | ||||||
|   HUB_TOKEN=os.environ.get("HUB_TOKEN", default="changeme"), |   HUB_TOKEN=os.environ.get("HUB_TOKEN", default="changeme"), | ||||||
|  |  | ||||||
|   # https://www.postgresql.org/docs/9.1/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS |   # https://www.postgresql.org/docs/9.1/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS | ||||||
|  | |||||||
| @ -112,6 +112,8 @@ def detail(id): | |||||||
|   if vm is None: |   if vm is None: | ||||||
|     return abort(404, f"{id} doesn't exist.") |     return abort(404, f"{id} doesn't exist.") | ||||||
|  |  | ||||||
|  |   vm['ssh_username'] = current_app.config['SSH_USERNAME'] | ||||||
|  |  | ||||||
|   if vm['deleted']: |   if vm['deleted']: | ||||||
|     return render_template("capsul-detail.html", vm=vm, delete=True, deleted=True) |     return render_template("capsul-detail.html", vm=vm, delete=True, deleted=True) | ||||||
|  |  | ||||||
|  | |||||||
| @ -22,7 +22,7 @@ def pricing(): | |||||||
|  |  | ||||||
| @bp.route("/faq") | @bp.route("/faq") | ||||||
| def faq(): | def faq(): | ||||||
|   return render_template("faq.html") |   return render_template("faq.html", ssh_username=current_app.config['SSH_USERNAME']) | ||||||
|  |  | ||||||
| @bp.route("/about-ssh") | @bp.route("/about-ssh") | ||||||
| def about_ssh(): | def about_ssh(): | ||||||
|  | |||||||
| @ -79,6 +79,10 @@ | |||||||
|         <label class="align" for="ipv4">IPv4 Address</label> |         <label class="align" for="ipv4">IPv4 Address</label> | ||||||
|         <span id="ipv4">{{ vm['ipv4'] }}</span> |         <span id="ipv4">{{ vm['ipv4'] }}</span> | ||||||
|       </div> |       </div> | ||||||
|  |       <div class="row justify-start"> | ||||||
|  |         <label class="align" for="ipv6">IPv6 Address</label> | ||||||
|  |         <span id="ipv6">{{ vm['ipv6'] }}</span> | ||||||
|  |       </div> | ||||||
|       <div class="row justify-start"> |       <div class="row justify-start"> | ||||||
|         <label class="align" for="os_description">Operating System</label> |         <label class="align" for="os_description">Operating System</label> | ||||||
|         <span id="os_description">{{ vm['os_description'] }}</span> |         <span id="os_description">{{ vm['os_description'] }}</span> | ||||||
| @ -97,7 +101,7 @@ | |||||||
|       </div> |       </div> | ||||||
|       <div class="row justify-start"> |       <div class="row justify-start"> | ||||||
|         <label class="align" for="ssh_username">SSH Username</label> |         <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> | ||||||
|       <div class="row justify-start"> |       <div class="row justify-start"> | ||||||
|         <label class="align" for="ssh_authorized_keys">SSH Authorized Keys</label> |         <label class="align" for="ssh_authorized_keys">SSH Authorized Keys</label> | ||||||
|  | |||||||
| @ -21,13 +21,13 @@ | |||||||
|    </li> |    </li> | ||||||
|    <li> |    <li> | ||||||
|      How do I log in? |      How do I log in? | ||||||
|      <p>ssh to the ip provided to you using the cyberian user.</p> |      <p>ssh to the ip provided to you using the "{{ ssh_username }}" user.</p> | ||||||
|      <pre class='code'>$ ssh cyberian@1.2.3.4</pre> |      <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> |      <p>For more information, see <a href="/about-ssh">Understanding the Secure Shell Protocol (SSH)</a>.</p> | ||||||
|    </li> |    </li> | ||||||
|    <li> |    <li> | ||||||
|      How do I change to the root user? |      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'> |      <pre class='code'> | ||||||
| # Linux | # Linux | ||||||
| $ sudo su - | $ sudo su - | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user