Add option to regen SSH host keys

This commit is contained in:
Taylor Helsper 2022-04-10 23:03:13 -05:00
parent 1b4eb6fff3
commit a0319a02ed
2 changed files with 67 additions and 37 deletions

View File

@ -863,6 +863,18 @@ def regen_https_certs_page():
flash("HTTPS Service Restarting", category="message")
return redirect(url_for(".page_settings"))
@mynode_settings.route("/settings/regen-ssh-keys")
def regen_ssh_keys_page():
check_logged_in()
#os.system("rm -f /home/bitcoin/.mynode/.gensshkeys")
os.system("rm -rf /etc/ssh/ssh_host_*")
os.system("dpkg-reconfigure openssh-server")
os.system("systemctl restart ssh")
flash("SSH Service Restarting", category="message")
return redirect(url_for(".page_settings"))
@mynode_settings.route("/settings/regen-electrs-certs")
def regen_electrs_certs_page():
check_logged_in()

View File

@ -111,6 +111,11 @@
"<p>Would you still like to restart QuickSync?</p>",
okFunction)
});
$("#show_quicksync").on("click", function() {
$("#show_quicksync").hide(0);
$("#show_quicksync_message").hide(0);
$("#quicksync_container").show();
});
$("#reboot-device").on("click", function() {
// Enable electrs
@ -999,6 +1004,11 @@
<a id="quicksync"></a>
<div class="settings_block_header">QuickSync</div>
{% if is_quicksync_disabled %}
<p id="show_quicksync_message">QuickSync is no longer recommended.</p>
<button id="show_quicksync" class="ui-button ui-widget ui-corner-all settings_button">Show QuickSync Settings</button>
{% endif %}
<div id="quicksync_container" {% if is_quicksync_disabled %}style="display: none;"{%endif%}>
<div class="settings_block_subheader">Toggle QuickSync</div>
{% if is_quicksync_disabled %}
Enabling QuickSync will help speed up syncing only during the initial block download period by downloading a pre-validated copy of the blockchain. It is no longer recommended.
@ -1042,6 +1052,7 @@
</form>
{% endif %}
</div>
</div>
<div class="settings_block">
@ -1080,6 +1091,13 @@
<div class="divider"></div>
<div class="settings_block_subheader">SSH Keys</div>
This will regenerate your SSH host keys.
<br/>
<a href="/settings/regen-ssh-keys" class="ui-button ui-widget ui-corner-all settings_button">Regenerate</a>
<div class="divider"></div>
<div class="settings_block_subheader">Reinstall Applications</div>
If you are having issues with a specific application, you can try to reinstall them via the list below.
<br/>