aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-05 18:09:25 -0300
committerEuAndreh <eu@euandre.org>2019-06-05 18:09:25 -0300
commit6f78c579237edaf4f14e23c24d3052aed1eb713e (patch)
treedeb924f5642040683da414dac1cfe76c8ce9fecf
parentFix permission of server private key on boot (diff)
downloadserver-6f78c579237edaf4f14e23c24d3052aed1eb713e.tar.gz
server-6f78c579237edaf4f14e23c24d3052aed1eb713e.tar.xz
Use non-standard port for SSH
-rw-r--r--secrets/envrc.shbin1495 -> 1530 bytes
-rw-r--r--ssh.env.conf1
-rwxr-xr-xuser-data.env.sh1
3 files changed, 2 insertions, 0 deletions
diff --git a/secrets/envrc.sh b/secrets/envrc.sh
index 7894b79..5811da7 100644
--- a/secrets/envrc.sh
+++ b/secrets/envrc.sh
Binary files differ
diff --git a/ssh.env.conf b/ssh.env.conf
index 6ce50ed..b3dc21d 100644
--- a/ssh.env.conf
+++ b/ssh.env.conf
@@ -2,5 +2,6 @@ Host $TLD
User root
IdentityFile $PWD/secrets/ssh/vps-box-client
UserKnownHostsFile $PWD/secrets/ssh/known-hosts.txt
+ Port $SSH_PORT
Host git.sr.ht
StrictHostKeyChecking no
diff --git a/user-data.env.sh b/user-data.env.sh
index e16aac7..67061c8 100755
--- a/user-data.env.sh
+++ b/user-data.env.sh
@@ -5,4 +5,5 @@ echo '$SSH_SERVER_PRIVATE_KEY' > /etc/ssh/vps-box-server
chmod 600 /etc/ssh/vps-box-server
echo '$SSH_SERVER_PUBLIC_KEY' > /etc/ssh/vps-box-server.pub
echo 'HostKey /etc/ssh/vps-box-server' >> /etc/ssh/sshd_config
+echo 'Port $SSH_PORT' >> /etc/ssh/sshd_config
systemctl restart sshd