5.8 KiB
5.8 KiB
created, type, updated
created | type | updated |
---|---|---|
2024-12-07T20:28:26.000Z | note | 2024-12-07T20:28:26.000Z |
Inspiron-660-Ubuntu
authorized_keys
ssh root@ubuntu.phares.duckdns.org -i C:/Users/phares/.ssh/id_ed25519
sudo -i
cat /root/.ssh/authorized_keys
nano /root/.ssh/authorized_keys
...
exit
Timezone
timedatectl set-timezone America/Phoenix
date
Sat Dec 7 12:30:22 PM MST 2024
apt-get update
apt upgrade -y
Create Users
chown podman:podman -R /home/podman
#
adduser lphares
#
mkdir /home/lphares/.ssh
cp /root/.ssh/authorized_keys /home/lphares/.ssh/authorized_keys
chown lphares:lphares -R /home/lphares
#
adduser bmiller
#
mkdir /home/bmiller/.ssh
cp /root/.ssh/authorized_keys /home/bmiller/.ssh/authorized_keys
chown bmiller:bmiller -R /home/bmiller
#
adduser pcortez
#
mkdir /home/pcortez/.ssh
cp /root/.ssh/authorized_keys /home/pcortez/.ssh/authorized_keys
chown pcortez:pcortez -R /home/pcortez
Directory Share
adduser bmiller lphares
sudo usermod -a -G lphares bmiller
newgrp lphares
systemctl restart ssh
Podman Quadlet Rootless Example
apt-get install podman -y
apt-cache rdepends podman-compose
apt-get install podman-compose -y
# apt-get remove podman-compose -y
# apt-get purge podman-compose -y
adduser podman sudo
passwd podman
sudo -iu podman
loginctl enable-linger
# 2.
podman --version
# podman version 4.9.3
# https://www.redhat.com/sysadmin/quadlet-podman
cd ~/
mkdir -p .config/containers/systemd/
# cp -R /run/user/0/ /run/user/1000/
mkdir -p /run/user/1000/
chown -R podman:podman /run/user/1000/
sudo -iu podman
cd ~/
mkdir -p ~/.bashrc.d
echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.bashrc.d/systemd
source ~/.bashrc.d/systemd
loginctl enable-linger 1000
systemctl --user daemon-reload
podman ps -a --sort names
systemctl --user enable --now podman.socket
exit
Cockpit
# apt install chkservice -y
apt-cache rdepends cockpit
apt install cockpit -y
# https://192.168.11.28:9090
# https://blog.while-true-do.io/podman-web-ui-via-cockpit/
apt-get install cockpit cockpit-podman -y
systemctl enable --now cockpit.socket
how to run a shell scripts at every login
sudo -iu podman
nano ~/.bash_profile
cd ~/
echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.bashrc.d/systemd
source ~/.bashrc.d/systemd
loginctl enable-linger 1000
systemctl --user daemon-reload
podman ps -a --sort names
Disable IPv6
# https://intercom.help/privatevpn/en/articles/6440374-how-to-disable-ipv6-on-ubuntu-and-fedora-linux
nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
sysctl -p
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
exit
reboot
nano /etc/default/grub
# https://opensource.com/article/22/8/disable-ipv6
# GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"
# GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX="ipv6.disable=1"
grub-mkconfig
exit
reboot
apt
apt install ncdu -y
apt install nala -y
nala install git -y
nala install links -y
Verify Podman Quadlet
mkdir /etc/containers/systemd/users/1000
sudo -iu podman
/usr/libexec/podman/quadlet -dryrun --user
# No files parsed from [
# /home/podman/.config/containers/systemd
# /etc/containers/systemd/users/1000
# /etc/containers/systemd/users
# ]
mkdir /home/podman/libexec-podman-quadlet-output
/usr/libexec/podman/quadlet --user /home/podman/libexec-podman-quadlet-output
Log
cp ~/.bash_history /etc/bash_history_2024-12-07.txt
# cat /etc/bash_history_2024-12-07.txt
exit