oizys/hosts/algiz
Daylin Morgan fde2538cb3
formatting
2024-01-28 23:31:00 -06:00
..
README.md not initial commit 2024-01-23 11:51:13 -06:00
default.nix abstract user config 2024-01-28 13:09:34 -06:00
hardware-configuration.nix not initial commit 2024-01-23 11:51:13 -06:00
system.nix formatting 2024-01-28 23:31:00 -06:00

README.md

sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key" sudo -u git cat /home/git/.ssh/id_rsa.pub | sudo -u git tee -a /home/git/.ssh/authorized_keys sudo -u git chmod 600 /home/git/.ssh/authorized_keys

Should Look like this

# SSH pubkey from git user
ssh-rsa <Gitea Host Key>

# other keys from users
command="/usr/local/bin/gitea --config=/data/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty <user pubkey>

Nixify this step.... cat <<"EOF" | sudo tee /usr/local/bin/gitea #!/bin/sh ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND="SSH_ORIGINAL_COMMAND\" $0 @" EOF sudo chmod +x /usr/local/bin/gitea