Skip to content

Instantly share code, notes, and snippets.

View suominen's full-sized avatar

Kimmo Suominen suominen

View GitHub Profile
@suominen
suominen / debrepo
Last active December 11, 2023 16:36
Manage a deb repository
#!/bin/sh
# @(#)$KimmoSuominen: .cfg/home/bin/share/debrepo,v 1.12 2023/12/11 16:35:53 kim Exp $
#
# Copyright (c) 2022-2023 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
@suominen
suominen / gist:4c840ebae302a0db02fc289c845ec42c
Created October 20, 2023 14:17
Ansible role for installing software on Debian
---
#
# Copyright (c) 2022 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@suominen
suominen / gist:124ae15c233bb9713005fcc3cef747c3
Created October 20, 2023 14:16
Ansible playbook for installing Docker CE on Debian
---
#
# Copyright (c) 2022 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@suominen
suominen / fix-signed-ttl
Created April 25, 2023 20:31
Fix large TTLs in signed zones (BIND)
#!/bin/sh
#
# Fix signed zones with excessively high TTLs
#
# 20230425 Kimmo Suominen
#
set -eu
PATH=/bin:/usr/bin
@suominen
suominen / refresh-ssh-host-keys
Created March 5, 2023 20:24
Refresh a host's keys in ~/.ssh/known_hosts
#!/bin/sh
# @(#)$KimmoSuominen: .cfg/home/bin/share/refresh-ssh-host-keys,v 1.2 2023/03/05 20:24:01 kim Exp $
#
# Refresh a host's keys in ~/.ssh/known_hosts
#
# 20221122 Kimmo Suominen
#
#
# Copyright (c) 2022-2023 Kimmo Suominen
@suominen
suominen / list-ssh-rsa-key-lengths
Created March 5, 2023 20:24
List host key information from ~/.ssh/known_hosts
#!/bin/sh
# @(#)$KimmoSuominen: .cfg/home/bin/share/list-ssh-rsa-key-lengths,v 1.3 2023/03/05 20:24:14 kim Exp $
#
# List host key information from ~/.ssh/known_hosts
#
# 20230225 Kimmo Suominen
#
#
# Copyright (c) 2023 Kimmo Suominen
@suominen
suominen / 1password.yml
Last active October 20, 2023 14:22
Ansible playbook for installing 1Password on Debian
---
#
# Copyright (c) 2022 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@suominen
suominen / 10-ssh-config
Created May 7, 2022 18:24
Harden sshd algorithms (EdgeOS 2)
#!/bin/sh
#
# Harden sshd algorithms
#
# EdgeOS 2:
# Copy this file to /config/scripts/post-config.d/10-ssh-config
# and make sure it is executable (chmod a+rx).
#
# Auditing ssh servers: https://github.com/jtesta/ssh-audit/
#
#!/bin/sh
#
# Copyright (c) 2020 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@suominen
suominen / download-netbsd-iso
Last active December 31, 2022 14:13
Download NetBSD-daily ISO images
#!/bin/sh
# @(#)$KimmoSuominen: .cfg/home/dot.cron/download-netbsd-iso,v 1.10 2022/12/31 14:12:37 kim Exp $
#
# Copyright (c) 2020-2022 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#