add: ssh authorized_keys

This commit is contained in:
Strix 2023-10-14 22:38:14 +02:00
parent 5d479b646c
commit bf6f76c215
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
2 changed files with 19 additions and 0 deletions

17
crates/01-ssh/crate.sh Normal file
View file

@ -0,0 +1,17 @@
#!/bin/sh
describe="setup ssh"
apply() {
[ -e "$HOME/.ssh/authorized_keys" ] || ln files/authorized_keys $HOME/.ssh/authorized_keys
if ! [ -f "$HOME/.ssh/id_rsa" ]; then
echo "Creating new ssh key for this device..."
ssh-keygen -f $HOME/.ssh/id_rsa -p "" -q
echo "Adding key to authorized_keys..."
cat $HOME/.ssh/id_rsa.pub > $HOME/.ssh/authorized_keys
fi
}
undo() {
echo "Undoing ssh keys is not supported, please do this manually."
}

View file

@ -0,0 +1,2 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCeNQfnbyyF3sht43vH5BcXDPca8nWu6bKPVGvAlWBOq4Av8ME2IQgwVe9nJ05r73ZY02/Vdqc01a8wyK5Hmw0XlPL0Cn6wc9QoiscOvq5lMUK87S2tr3EVLGkgl8o7nmVuWgLewyojiORjM02P1PZEiFhKPXVEQFxU0dFz9QtpAdm0u78Xn2HTukHpXSv44R3XDDMFZ3Ek/XRuS6J9dZVxGkgCLQhK8kpfbxuiYxaRC7MHgGlYuxjLuZ6P4i+V+SSSShfCGdm6U9bgeIAwftN6a8Pc9+OsBeZGSUrGjZjRlD35q0a7fbpoS8pKTfbwgf/ijYeu3JmAQUlY+H959mIpg4H9XOgRrKVJSYwx5/BGuhmWgVy6HIYpXCQfEbLE7QDmwC2C430KzAH6jCcrRNyurIUCuO4iq9dwoQTzboMccOK79S2Z+1B5fYgS3BZgaiTUBSME2G2FriM6utgleiBnvFu/p7oH2I8ZHL/aVcSWAw0gbzsr7ADywAuiDNZk18c= raine@ryuk
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDPLKzkRko5pgr7tvQWL4cbOdrK5QLxzpp5lALPAB6YR0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