masterpdfeditor-free-pkg/any/cs-dev-sshkeys/cs-dev-sshkeys.install

26 lines
1021 B
Plaintext

post_install(){
cat >> root/.ssh/authorized_keys <<EOF
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPOydCxv9/tAV7AdS2HsUIEu547Z5qUJnWYwiO7rI9YL markus@markus-pc
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUTcUBb+55jRY9TkpLgm8K/8nJfEXyjEX8zljdCCRpi markus@markus-nb
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFo3dc6H1FtVuliB70QY21+7Hsuheqq5ldfgGWg+QLXJ root@ares
EOF
}
# post_update(){
# sed --in-place \
# --regexp-extended '/^ssh-ed25519 .* (markus@markus-pc|markus@markus-nb|root@ares)$/d' \
# root/.ssh/authorized_keys
# cat >> root/.ssh/authorized_keys <<EOF
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPOydCxv9/tAV7AdS2HsUIEu547Z5qUJnWYwiO7rI9YL markus@markus-pc
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUTcUBb+55jRY9TkpLgm8K/8nJfEXyjEX8zljdCCRpi markus@markus-nb
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFo3dc6H1FtVuliB70QY21+7Hsuheqq5ldfgGWg+QLXJ root@ares
# EOF
# }
post_remove(){
sed --in-place \
--regexp-extended '/^ssh-ed25519 .* (markus@markus-pc|markus@markus-nb|root@ares)$/d' \
root/.ssh/authorized_keys
}