]> git.hoellein.online Git - homeserver/commitdiff
autossh
authormhoellein <mhoellein@freenet.de>
Fri, 7 Dec 2018 10:28:44 +0000 (11:28 +0100)
committermhoellein <mhoellein@freenet.de>
Fri, 7 Dec 2018 10:28:44 +0000 (11:28 +0100)
reverse ssh tunnel zum vserver

16 files changed:
.etckeeper
default/locale
group
group-
gshadow
gshadow-
passwd
passwd-
shadow
shadow-
subgid
subgid-
subuid
subuid-
systemd/system/autossh.service [new file with mode: 0644]
systemd/system/multi-user.target.wants/autossh.service [new symlink]

index 9d10177b3b84181676b4fefb131ee3976ca5ea4d..f6548a2beb54656aa119c01158b28c5d3baf7a27 100755 (executable)
@@ -4588,6 +4588,7 @@ maybe chmod 0644 'systemd/resolved.conf'
 maybe chmod 0755 'systemd/system'
 maybe chmod 0644 'systemd/system.conf'
 maybe chmod 0644 'systemd/system/alexa.service'
+maybe chmod 0644 'systemd/system/autossh.service'
 maybe chmod 0755 'systemd/system/bluetooth.target.wants'
 maybe chmod 0755 'systemd/system/default.target.wants'
 maybe chmod 0755 'systemd/system/display-manager.service.wants'
index fcd6317026a829ec405d34d4cc94d004c8746d07..1b3533357b6b7c2fc6e69e7947118d026ba8d4a9 100644 (file)
@@ -1,9 +1 @@
-#LANG=de_DE.UTF-8
-LC_NUMERIC="he_IL.UTF-8"
-LC_MONETARY="he_IL.UTF-8"
-LC_PAPER="he_IL.UTF-8"
-LC_NAME="he_IL.UTF-8"
-LC_ADDRESS="he_IL.UTF-8"
-LC_TELEPHONE="he_IL.UTF-8"
-LC_MEASUREMENT="he_IL.UTF-8"
-LC_IDENTIFICATION="he_IL.UTF-8"
+LANG=de_DE.UTF-8
diff --git a/group b/group
index b0c248b55d5431678776d45d4f9bda6439f6b85f..25c0a8df91c44a0a5c8f282bdcb4429f2a8cb98a 100644 (file)
--- a/group
+++ b/group
@@ -102,3 +102,4 @@ rdma:x:151:
 geoclue:x:155:
 lool:x:156:
 serverbackup:x:5003:
+autossh:x:5004:
diff --git a/group- b/group-
index 6d7399a909cf1f61452f6e760dd38a27179da337..b0c248b55d5431678776d45d4f9bda6439f6b85f 100644 (file)
--- a/group-
+++ b/group-
@@ -101,3 +101,4 @@ Debian-snmp:x:121:
 rdma:x:151:
 geoclue:x:155:
 lool:x:156:
+serverbackup:x:5003:
diff --git a/gshadow b/gshadow
index 4aacf351263fbdbeb291f472a75a08a000011662..e7a1a38a2d4ed195539eced6b6458d6f17ed3312 100644 (file)
--- a/gshadow
+++ b/gshadow
@@ -102,3 +102,4 @@ rdma:!::
 geoclue:!::
 lool:!::
 serverbackup:!::
+autossh:!::
index 2910f44b2bc0be234867b7beaa6e95d6ad263152..4aacf351263fbdbeb291f472a75a08a000011662 100644 (file)
--- a/gshadow-
+++ b/gshadow-
@@ -101,3 +101,4 @@ Debian-snmp:!::
 rdma:!::
 geoclue:!::
 lool:!::
+serverbackup:!::
diff --git a/passwd b/passwd
index 883bc0068f0c7fab4487625daf9d9a2c6f9997e3..d71abaac35f392bf83d052425d27cc792429d757 100644 (file)
--- a/passwd
+++ b/passwd
@@ -75,3 +75,4 @@ Debian-snmp:x:145:121::/var/lib/snmp:/bin/false
 geoclue:x:148:155::/var/lib/geoclue:/usr/sbin/nologin
 lool:x:149:156::/opt/lool:/usr/sbin/nologin
 serverbackup:x:5003:5003::/home/serverbackup:/bin/bash
+autossh:x:5004:5004:ssh tunnel user:/home/autossh:/bin/sh
diff --git a/passwd- b/passwd-
index ffb2b5724fdceb7d9f030d761cbde47ad501c01a..883bc0068f0c7fab4487625daf9d9a2c6f9997e3 100644 (file)
--- a/passwd-
+++ b/passwd-
@@ -74,3 +74,4 @@ cups-pk-helper:x:111:108:user for cups-pk-helper service,,,:/home/cups-pk-helper
 Debian-snmp:x:145:121::/var/lib/snmp:/bin/false
 geoclue:x:148:155::/var/lib/geoclue:/usr/sbin/nologin
 lool:x:149:156::/opt/lool:/usr/sbin/nologin
+serverbackup:x:5003:5003::/home/serverbackup:/bin/bash
diff --git a/shadow b/shadow
index 9839f507d745d30d9d6a85e5d24f172de32f501c..6aceca982dc75f61300a7522f6a4e43f42282426 100644 (file)
--- a/shadow
+++ b/shadow
@@ -75,3 +75,4 @@ Debian-snmp:!:17827:0:99999:7:::
 geoclue:*:17827:0:99999:7:::
 lool:*:17828:0:99999:7:::
 serverbackup:$6$eaExedUs$qMxK2M5Q/pA6bz8crjGw1pESBnAFkus3IHDZTkCe1FFOw6LECghvQfM86zyNk.G4L5chDSgYeElHSvWgPIxJ.1:17841:0:99999:7:::
+autossh:!:17872:0:99999:7:::
diff --git a/shadow- b/shadow-
index a14109504dd567407818925b82ce190287ef90dd..9839f507d745d30d9d6a85e5d24f172de32f501c 100644 (file)
--- a/shadow-
+++ b/shadow-
@@ -74,3 +74,4 @@ cups-pk-helper:*:17827:0:99999:7:::
 Debian-snmp:!:17827:0:99999:7:::
 geoclue:*:17827:0:99999:7:::
 lool:*:17828:0:99999:7:::
+serverbackup:$6$eaExedUs$qMxK2M5Q/pA6bz8crjGw1pESBnAFkus3IHDZTkCe1FFOw6LECghvQfM86zyNk.G4L5chDSgYeElHSvWgPIxJ.1:17841:0:99999:7:::
diff --git a/subgid b/subgid
index 528dacee47cf0fbc845f76f901962090633188be..fe085b9b1eb3ca5a13e824ff06a15a95f24ebbbb 100644 (file)
--- a/subgid
+++ b/subgid
@@ -5,3 +5,4 @@ git:296608:65536
 door:362144:65536
 webssh:427680:65536
 serverbackup:493216:65536
+autossh:558752:65536
diff --git a/subgid- b/subgid-
index 2d2190c344fa2b040de6300f8280035680a05652..528dacee47cf0fbc845f76f901962090633188be 100644 (file)
--- a/subgid-
+++ b/subgid-
@@ -4,3 +4,4 @@ remoteBackup:231072:65536
 git:296608:65536
 door:362144:65536
 webssh:427680:65536
+serverbackup:493216:65536
diff --git a/subuid b/subuid
index 528dacee47cf0fbc845f76f901962090633188be..fe085b9b1eb3ca5a13e824ff06a15a95f24ebbbb 100644 (file)
--- a/subuid
+++ b/subuid
@@ -5,3 +5,4 @@ git:296608:65536
 door:362144:65536
 webssh:427680:65536
 serverbackup:493216:65536
+autossh:558752:65536
diff --git a/subuid- b/subuid-
index 2d2190c344fa2b040de6300f8280035680a05652..528dacee47cf0fbc845f76f901962090633188be 100644 (file)
--- a/subuid-
+++ b/subuid-
@@ -4,3 +4,4 @@ remoteBackup:231072:65536
 git:296608:65536
 door:362144:65536
 webssh:427680:65536
+serverbackup:493216:65536
diff --git a/systemd/system/autossh.service b/systemd/system/autossh.service
new file mode 100644 (file)
index 0000000..4eac245
--- /dev/null
@@ -0,0 +1,17 @@
+[Unit]
+Description=Keeps a tunnel to 'remote.example.com' open
+After=network.target ssh.service
+
+[Service]
+User=autossh
+# -p [PORT]
+# -l [user]
+# -M 0 --> no monitoring
+# -N Just open the connection and do nothing (not interactive)
+# LOCALPORT:IP_ON_EXAMPLE_COM:PORT_ON_EXAMPLE_COM
+ExecStart=/usr/bin/autossh -M 20000 -f -i /root/.ssh/root@hoellein.online -N -T -R12345:localhost:22 root@hoellein.online
+ExecStop=/usr/bin/killall -s KILL autossh
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target
diff --git a/systemd/system/multi-user.target.wants/autossh.service b/systemd/system/multi-user.target.wants/autossh.service
new file mode 120000 (symlink)
index 0000000..c132a27
--- /dev/null
@@ -0,0 +1 @@
+/etc/systemd/system/autossh.service
\ No newline at end of file