Naposledy aktivní 1760251296

Revize 48bca71002e9b7b6f6ece46aeb44c15be96031ad

aptupdate Raw
1#!/bin/sh
2sudo apt update
3sudo DEBIAN_FRONTEND=noninteractive apt -y upgrade
4sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
5sudo apt -y autoremove
6sudo apt -y autoclean
7sudo apt -y clean
getpubkey.sh Raw
1#!/bin/bash
2
3# Prompt the user for their GitHub username
4read -p "Enter your GitHub username: " USERNAME
5
6# Get the GitHub public key URL
7KEY_URL="https://github.com/$USERNAME.keys"
8
9pushd ~/.ssh/
10
11# Download the public key
12wget -q -O - "$KEY_URL" > ~/.ssh/authorized_keys
13
14# Set appropriate permissions for the authorized_keys file
15chmod 600 ~/.ssh/authorized_keys
16
17# Check if the .ssh directory exists and create it if it doesn't
18if [ ! -d ~/.ssh ]; then
19 mkdir -p ~/.ssh
20 chmod 700 ~/.ssh
21fi
22
23echo "Public key successfully added to authorized_keys"