summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-10-26 09:04:14 +0300
committerMaxim Devaev <[email protected]>2021-10-26 09:04:14 +0300
commit10e6e5300686c0e13492fddeb1fcb9d901c2134a (patch)
treefad66b60b5cc683e9a324e518df7d0613b2c835e
parent7c9405459e603bdab3ca3bedb8a81eabca31e2d3 (diff)
pikvm/pikvm#107: change ssh port in pikvm.txt
-rwxr-xr-xscripts/kvmd-bootconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/kvmd-bootconfig b/scripts/kvmd-bootconfig
index a746c2cd..f7931e5f 100755
--- a/scripts/kvmd-bootconfig
+++ b/scripts/kvmd-bootconfig
@@ -73,6 +73,13 @@ if [ -n "$FIRSTBOOT" ]; then
fi
+# ========== SSH ==========
+
+if [ -n "$SSH_PORT" ]; then
+ sed -i -e "s/^\s*#*\s*Port\s\+.*$/Port $SSH_PORT/g" /etc/ssh/sshd_config
+fi
+
+
# ========== Wi-Fi ==========
# Set the regulatory domain for wifi, if defined.