update publish script and the public keys location
This commit is contained in:
@@ -10,6 +10,11 @@ if [ "$(ls /home |grep saret)" != "saret" ]; then
|
||||
passwd root -d
|
||||
username=saret
|
||||
password=qwerty
|
||||
if [[ $(ip a |grep -oP '(?<=inet\s)\d[^\s]+') =~ '192.168.1.17' ]]; then
|
||||
for loc in $(sudo grep -ilr $HOSTNAME /etc); do
|
||||
sudo sed -i "s/$HOSTNAME/ToyServer/g" $loc
|
||||
done
|
||||
fi
|
||||
sudo adduser --gecos "" --disabled-password $username
|
||||
sudo chpasswd <<<"$username:$password"
|
||||
sudo usermod -aG sudo $username
|
||||
@@ -17,11 +22,7 @@ if [ "$(ls /home |grep saret)" != "saret" ]; then
|
||||
chown $username:$username /SSH -R
|
||||
chmod au+xwr /SSH -R
|
||||
mkdir -p /home/saret/.ssh 2>/dev/null
|
||||
touch /home/saret/.ssh/authorized_keys
|
||||
pubs=(AzureSSH.pub CloudConsole.pub DebianGithub.pub DebianMachine.pub KorenSSH.pub LibreGithub.pub OracleServerGitHub.pub VisualStudio.pub Windows2Github.pub WindowsGithub.pub WindowsMachine.pub phoney.pub)
|
||||
for p in ${pubs[@]}; do
|
||||
curl -sSL https://git.saret.tk/saret/clientlinux/raw/branch/main/$p |tee -a /home/saret/.ssh/authorized_keys
|
||||
done
|
||||
curl -sSL -X 'GET' 'https://vault.saret.tk/v1/kv/data/PublicKeys' -H 'accept: application/json' -H 'X-Vault-Token: hvs.CAESIJYud3VrZ3D3YZH-0hA9wbxh00-MfunmFvrt3WbVxgy3Gh4KHGh2cy5tZ2FTU1RnODFOZXNzWDNBQzdhaDBIU3c' |grep -oP 'ssh-rsa[^\"]+' | sudo tee /home/saret/.ssh/authorized_keys
|
||||
chown saret:saret /home/saret/.ssh -R
|
||||
# Debian Machine
|
||||
sudo reboot
|
||||
@@ -101,7 +102,7 @@ sed -i 's/ZSH_THEME="mrtazz"/ZSH_THEME="agnoster"/' ~/.zshrc
|
||||
wget https://dot.net/v1/dotnet-install.sh
|
||||
chmod a+x dotnet-install.sh
|
||||
./dotnet-install.sh
|
||||
sudo chsh $USER -s $(whereis fish)
|
||||
# sudo chsh $USER -s $(whereis fish)
|
||||
sudo rm $(ls)
|
||||
sudo tee /etc/timezone <<<Asia/Jerusalem
|
||||
git commit --global user.email "saretbenny@gmail.com"
|
||||
@@ -110,7 +111,6 @@ git config --global user.email "saretbenny@gmail.com"
|
||||
git config --global user.name "1kamma"
|
||||
if [ "$HOST" = "tritium-h5" || "$HOST" = "libre-computer" ]; then
|
||||
curl -sSL "https://www.googleapis.com/drive/v3/files/12E1DAwQaQUT7lWOs1EhTD5Xk_sAnGqjo?alt=media&key=AIzaSyCy8ppkVWYQFSznbe1SHuAITSZ-ux_ZCZk" >/home/saret/.ssh/LibreGithub
|
||||
su -c 'wget -O - "https://connect.jfrog.io/install_connect" | sh -s VBr9r2byCYKNaE3rgZwYZANg8BueGk3HAQ Server'
|
||||
curl -fsSL https://archive.heckel.io/apt/pubkey.txt | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/archive.heckel.io.gpg
|
||||
tee /etc/apt/sources.list.d/archive.heckel.io.list <<EOF
|
||||
deb https://archive.heckel.io/apt debian main
|
||||
@@ -122,7 +122,12 @@ EOF
|
||||
sudo systemctl start ntfy
|
||||
sudo tee /Scripts/rebooting <<EOF
|
||||
#!/bin/bash
|
||||
ntfy pub -t "started up Libre server (The TOY-server)" -m "$(date)" https://ntfy.d.metallum.eu.org/ServerState
|
||||
while [[ ! \$(hostname -I) ]]; do
|
||||
sleep 1
|
||||
done
|
||||
myip=\$(ip a |grep -oP '(?<=inet6\s)2[^/]+')
|
||||
modemip=\$(sshpass -p '1234567890' ssh admin@192.168.0.1 ip a |grep -oP '(?<=inet6\s)2[^\/]+')
|
||||
ntfy pub -t "started up Libre server (The TOY-server)" -m "\$(date)\nmy ip: \$myip\n\nmodem ip:\$modemip" https://ntfy.d.metallum.eu.org/ServerState
|
||||
EOF
|
||||
sudo chmod a+x /Scripts/rebooting
|
||||
tee /home/saret/.ssh/config <<EOF
|
||||
|
Reference in New Issue
Block a user