diff --git a/238.kebler.net/function/ssh-mounts/gpcca b/238.kebler.net/function/ssh-mounts/gpcca new file mode 100644 index 0000000..9555686 --- /dev/null +++ b/238.kebler.net/function/ssh-mounts/gpcca @@ -0,0 +1,33 @@ +#!/bin/bash + +function mntccadmin() { + smount sysadmin@admin.cc.gpccaor.net:/home/sysadmin /mnt/gpcca/admin/sysadmin -p 22 + smount sysadmin@admin.cc.gpccaor.net:/opt /mnt/gpcca/admin/opt -p 22 + smount sysadmin@admin.cc.gpccaor.net:/data /mnt/gpcca/admin/data -p 22 + smount root@admin.cc.gpccaor.net:/ /mnt/gpcca/admin/root -p 22 + smount root@admin.cc.gpccaor.net:/etc /mnt/gpcca/admin/etc -p 22 +} + +function umntccadmin() { + usmount /mnt/gpcca/admin/opt + usmount /mnt/gpcca/admin/data + usmount /mnt/gpcca/admin/root + usmount /mnt/gpcca/admin/etc + usmount /mnt/gpcca/admin/sysadmin +} + +function mntccav() { + smount sysadmin@av.cc.gpccaor.net:/home/sysadmin /mnt/gpcca/av/sysadmin -p 22 + smount sysadmin@av.cc.gpccaor.net:/opt /mnt/gpcca/av/opt -p 22 + smount sysadmin@av.cc.gpccaor.net:/data /mnt/gpcca/av/data -p 22 + smount root@av.cc.gpccaor.net:/ /mnt/gpcca/av/root -p 22 + smount root@av.cc.gpccaor.net:/etc /mnt/gpcca/av/etc -p 22 +} + +function umntccav() { + usmount /mnt/gpcca/av/opt + usmount /mnt/gpcca/av/data + usmount /mnt/gpcca/av/root + usmount /mnt/gpcca/av/etc + usmount /mnt/gpcca/av/sysadmin +} diff --git a/312.kebler.net/function/ssh-mounts/312 b/312.kebler.net/function/ssh-mounts/312 deleted file mode 100644 index 5519164..0000000 --- a/312.kebler.net/function/ssh-mounts/312 +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/ - -function mnt312admin() { - smount sysadmin@admin.312.kebler.net:/home/sysadmin /mnt/312/admin/sysadmin -p 22 - smount sysadmin@admin.312.kebler.net:/opt /mnt/312/admin/opt -p 22 - smount sysadmin@admin.312.kebler.net:/mnt/data /mnt/312/admin/data -p 22 - smount root@admin.312.kebler.net:/ /mnt/312/admin/root -p 22 - smount root@admin.312.kebler.net:/etc /mnt/312/admin/etc -p 22 -} - -function umnt312admin() { - usmount /mnt/312/admin/opt - usmount /mnt/312/admin/data - usmount /mnt/312/admin/root - usmount /mnt/312/admin/etc - usmount /mnt/312/admin/sysadmin -} - diff --git a/all/env/backup.env b/all/env/backup.env new file mode 100755 index 0000000..2292603 --- /dev/null +++ b/all/env/backup.env @@ -0,0 +1 @@ +export BACKUP_SERVER=https://backup.kebler.net \ No newline at end of file diff --git a/all/function/ssh b/all/function/ssh new file mode 100644 index 0000000..923108a --- /dev/null +++ b/all/function/ssh @@ -0,0 +1,8 @@ +ssh_dir_permissions() { + sudo chown -R $USER:$USER $HOME/.ssh + sudo chmod 00700 $HOME/.ssh + sudo chmod 600 $HOME/.ssh/authorized_keys + sudo chmod 400 $HOME/.ssh/id_rsa + sudo chmod 644 $HOME/.ssh/id_rsa.pub + sudo chmod 600 $HOME/.ssh/known_hosts +} diff --git a/sj312.net/function/ssh-mounts/312 b/sj312.net/function/ssh-mounts/312 new file mode 100755 index 0000000..7f9cdf8 --- /dev/null +++ b/sj312.net/function/ssh-mounts/312 @@ -0,0 +1,35 @@ +#!/bin/ + +function mnt312admin() { + smount sysadmin@admin.sj312.net:/home/sysadmin /mnt/312/admin/sysadmin -p 22 + smount sysadmin@admin.sj312.net:/opt /mnt/312/admin/opt -p 22 + smount sysadmin@admin.sj312.net:/data /mnt/312/admin/data -p 22 + smount sysadmin@admin.sj312.net:/shell /mnt/312/admin/shell -p 22 + smount root@admin.sj312.net:/ /mnt/312/admin/root -p 22 + smount root@admin.sj312.net:/etc /mnt/312/admin/etc -p 22 +} + +function umnt312admin() { + usmount /mnt/312/admin/opt + usmount /mnt/312/admin/data + usmount /mnt/312/admin/root + usmount /mnt/312/admin/shell + usmount /mnt/312/admin/etc + usmount /mnt/312/admin/sysadmin +} + +function mnt312tv() { + smount sysadmin@tv.sj312.net:/home/sysadmin /mnt/312/tv/sysadmin -p 22 + smount sysadmin@tv.sj312.net:/opt /mnt/312/tv/opt -p 22 + smount sysadmin@tv.sj312.net:/data /mnt/312/tv/data -p 22 + smount root@tv.sj312.net:/ /mnt/312/tv/root -p 22 + smount root@tv.sj312.net:/etc /mnt/312/tv/etc -p 22 +} + +function umnt312tv() { + usmount /mnt/312/tv/opt + usmount /mnt/312/tv/data + usmount /mnt/312/tv/root + usmount /mnt/312/tv/etc + usmount /mnt/312/tv/sysadmin +} diff --git a/312.kebler.net/ssh/config/312.cfg b/sj312.net/ssh/config/312.cfg old mode 100644 new mode 100755 similarity index 52% rename from 312.kebler.net/ssh/config/312.cfg rename to sj312.net/ssh/config/312.cfg index 8aa8d87..bb0d718 --- a/312.kebler.net/ssh/config/312.cfg +++ b/sj312.net/ssh/config/312.cfg @@ -12,10 +12,26 @@ ForwardX11Trusted yes Host 312admin user sysadmin - hostname admin.312.kebler.net + hostname admin.sj312.net ForwardX11 yes Host 312adminr user root - hostname admin.312.kebler.net + hostname admin.sj312.net ForwardX11 yes + +Host 312tv + user sysadmin + hostname tv.sj312.net + ForwardX11 yes + +Host 312tvr + user root + hostname tv.sj312.net + ForwardX11 yes + +Host 312hass + user root + hostname hass.sj312.net + port 22222 +