312 configs and mounts

gpcca mounts
added ssh_dir_permissions to set correct permissions for using ssh
add env for subdomain of backup server
master
Kebler Network System Administrator 2021-11-20 17:39:07 -08:00
parent ccb75844ac
commit 752fea5ee7
6 changed files with 95 additions and 20 deletions

View File

@ -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
}

View File

@ -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
}

1
all/env/backup.env vendored Executable file
View File

@ -0,0 +1 @@
export BACKUP_SERVER=https://backup.kebler.net

8
all/function/ssh Normal file
View File

@ -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
}

View File

@ -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
}

View File

@ -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