Skip to content

Instantly share code, notes, and snippets.

@manics
manics / luksloopback.sh
Created October 25, 2023 19:28 — forked from dbehnke/luksloopback.sh
luks encryption with loopback file
#!/bin/bash
loopdevice=/dev/loop0
loopfile=crypt.loop
#megabytes
loopsize=256
#/dev/mapper/xxxxx when open
cryptmapper=myCrypt
@manics
manics / mount-encrypted-partition-fedora-live-usb.sh
Created January 15, 2023 16:32 — forked from agilepoodle/mount-encrypted-partition-fedora-live-usb.sh
When you need to access LUKS encrypted partition with a Fedora Live CD or USB
# make sure crypt module in use
sudo modprobe dm-crypt
# Find out which drive it was with the following command:
sudo fdisk -l
# You must mount /dev/sda3 myvolume
# use cryptsetup, device is accessible under /dev/mapper/myvolume
sudo cryptsetup luksOpen /dev/sde3 myvolume
@manics
manics / notify.py
Created May 19, 2020 06:57 — forked from stick/notify.py
old osx notify callback plugin for ansible
# (C) 2012, Michael DeHaan, <[email protected]>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.