Skip to content

Instantly share code, notes, and snippets.

View amritanshu-pandey's full-sized avatar
🤣

Amritanshu Pandey (Amrit) amritanshu-pandey

🤣
View GitHub Profile
@amritanshu-pandey
amritanshu-pandey / usb-unlock-luks.md
Created May 17, 2021 06:03 — forked from da-n/usb-unlock-luks.md
Unlock LUKS full disk with USB stick

Configuration for passwordless root filesystem

Source: https://www.howtoforge.com/tutorial/passwordless-encryption-of-linux-root-partition/

The process of entering the passphrase at boot time will now be automated using an USB memory stick. Instead of using a passphrase , the secret key on the USB will decrypt the encrypted volumes. Connect an USB stick to the VM and locate it using the dmesg command. It is detected as /dev/sdb in my VM.

The secret key of 8192 random byte is extracted from the usb stick using the dd command.

dd if=/dev/sdb of=/root/secret.key bs=512 skip=4 count=16
@amritanshu-pandey
amritanshu-pandey / Backup-Folders.ps1
Created March 12, 2020 22:15 — forked from Boggin/gist:5649e5873c076060678817eab826d38b
Use Restic to perform backups to Backblaze B2.
#requires -version 4
<#
.SYNOPSIS
Restic backup script.
.DESCRIPTION
Use Restic to perform backups to Backblaze B2.
.PARAMETER Repository
The path to the Restic repository, e.g. 'b2:my-named-repo'.