From 04442676a331a540bf7e39d0fdc5d257ad67b75c Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 28 Oct 2024 13:14:30 -0400 Subject: [PATCH] [ssh] Update git key --- .gitignore | 1 + bin/.bin/newjail | 27 +++++++++------------------ ssh/.ssh/2024_git.pub | 1 + ssh/.ssh/config | 4 ++-- x/.xinitrc | 4 ++-- 5 files changed, 15 insertions(+), 22 deletions(-) create mode 100644 ssh/.ssh/2024_git.pub diff --git a/.gitignore b/.gitignore index ae90443..1330d43 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ QtProject.conf powellc 1904_powellc 2022_git +2024_git 2022_h2_powellc 2022_q4_sure jails diff --git a/bin/.bin/newjail b/bin/.bin/newjail index 6b9f112..9012188 100755 --- a/bin/.bin/newjail +++ b/bin/.bin/newjail @@ -1,27 +1,18 @@ #!/bin/sh # Create the jail with dhcp on -iocage create -r 12.2-RELEASE --name $1 dhcp=on - -# Install avahi and .local DNS -iocage exec -f $1 "pkg install -y avahi-app dbus nss_mdns && sysrc dbus_enable="YES" && sysrc avahi_daemon_enable="YES"" -iocage exec $1 sed -i -e '/^hosts/s/dns/mdns dns/' /etc/nsswitch.conf -iocage exec $1 "service dbus start && service avahi-daemon start" +iocage create -r 14.1-RELEASE --name $1 dhcp=on boot=on +# Install mdnsd and .local DNS +iocage exec -f $1 "pkg install -y python311 openmdns && sysrc mdnsd_enable="YES" && sysrc mdnsd_flags=epair0b && service mdnsd start" # Copy our jail public key to allow login -mkdir /zroot/iocage/jails/$1/root/root/.ssh -cp .ssh/jails.pub /zroot/iocage/jails/$1/root/root/.ssh/authorized_keys +mkdir /tank/iocage/jails/$1/root/root/.ssh +cp /home/powellc/.ssh/jails.pub /tank/iocage/jails/$1/root/root/.ssh/authorized_keys # Allow root login and start SSH -iocage exec $1 sed -i -e '/^#PermitRootLogin/s/#Permit/Permit/' /etc/ssh/sshd_config -iocage exec $1 sed -i -e '/^PermitRootLogin/s/no/yes/' /etc/ssh/sshd_config -iocage exec $1 sysrc sshd_enable="YES" -iocage exec $1 service sshd start +iocage exec -f $1 "echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && sysrc sshd_enable="YES" && service sshd start" # Add our new IP address to our unbound local zone -ip_address=$(iocage exec $1 ifconfig epair0b | grep 'inet ' | awk '{print $2}') -echo 'local-data: "'$1'.local IN A '$ip_address'"' >> /zroot/iocage/jails/dns/root/var/unbound/local.zones -iocage exec dns service unbound restart - - - +#ip_address=$(iocage exec $1 ifconfig epair0b | grep 'inet ' | awk '{print $2}') +#echo 'local-data: "'$1'.service IN A '$ip_address'"' >> /tank/iocage/jails/dns/root/var/unbound/service.zones +#iocage exec dns service unbound restart diff --git a/ssh/.ssh/2024_git.pub b/ssh/.ssh/2024_git.pub new file mode 100644 index 0000000..6f4a1cc --- /dev/null +++ b/ssh/.ssh/2024_git.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFqEWd49UDDidJ6CoWDPFL5F9B2+LJQuANRPdTS5s8TY code@unbl.ink diff --git a/ssh/.ssh/config b/ssh/.ssh/config index ce388f3..0dc0fd5 100644 --- a/ssh/.ssh/config +++ b/ssh/.ssh/config @@ -16,9 +16,9 @@ Host github.com # Home Gitea account: Host code.unbl.ink git.service 192.168.40.118 gogs* - Port 2222 + Port 22 User git - IdentityFile ~/.ssh/2022_git + IdentityFile ~/.ssh/2024_git PreferredAuthentications publickey PasswordAuthentication no IdentitiesOnly yes diff --git a/x/.xinitrc b/x/.xinitrc index 1907fc1..df0a4a0 100644 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -8,6 +8,6 @@ fi #setxkbmap -model pc105 -layout us,ru -option grp:ctrls_toggle #setxkbmap -option caps:escape -option compose:ralt & -setxkbmap -option terminate:ctrl_alt_bksp +#setxkbmap -option terminate:ctrl_alt_bksp -exec i3 +exec gnome-session