Skip to content

Instantly share code, notes, and snippets.

.ssh

Security Consideration

About SSH Agent Forwarding :

SSH Agent forwarding exposes your authentication to the server you're connecting to. By default, an attacker with control of the server (i.e. root access) can communicate with your agent and use your key to authenticate to other servers without any notification (i.e. impersonate you).

@frntn
frntn / gcloud_commands
Last active February 27, 2024 11:10
all gcloud commands
gcloud auth
gcloud auth activate-refresh-token
gcloud auth activate-service-account
gcloud auth git-helper
gcloud auth list
gcloud auth login
gcloud auth print-access-token
gcloud auth print-refresh-token
gcloud auth revoke
gcloud components
@frntn
frntn / gist:f25726df962fc29c6dde
Last active November 1, 2023 15:18
azure-cli cheatsheet
azure
account
list [options] #List the imported subscriptions
show [options] [subscriptionNameOrId] #Show details about a subscription
set [options] <subscriptionNameOrId> #Set the current subscription
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info
import [options] <file> #Import a publishsettings file or certificate for your account
download [options] #Launch a browser to download your publishsettings file
env... #Commands to manage your account environment
@frntn
frntn / broadcast_calc.sh
Created May 23, 2018 21:13 — forked from cskeeters/broadcast_calc.sh
Bash script for calculating network and broadcast addresses from ip and netmask or CIDR Notation
#!/bin/bash
# Calculates network and broadcast based on supplied ip address and netmask
# Usage: broadcast_calc.sh 192.168.0.1 255.255.255.0
# Usage: broadcast_calc.sh 192.168.0.1/24
tonum() {
if [[ $1 =~ ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]; then
@frntn
frntn / keyservers.md
Created October 14, 2020 06:46 — forked from rjhansen/keyservers.md
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@frntn
frntn / gpg-key-validity.sh
Created June 21, 2017 01:59
GnuPG web of trust : automate multiple scenarii to help the understanding of https://www.gnupg.org/gph/en/manual/x334.html
#!/bin/bash
# Author: Matthieu Fronton <m@tthieu.fr>
# Profile: github.com/frntn
# Description: GnuPG web of trust : automate multiple scenarii to help the understanding of https://www.gnupg.org/gph/en/manual/x334.html
WAIT=4
if [ -t 1 ]; then
cya="$(tput setaf 6)"
@frntn
frntn / clean-up-boot-partition-ubuntu.md
Created October 24, 2018 19:49 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@frntn
frntn / qubes-secpack-signature-check
Created April 3, 2018 14:56
Missing Pubkey in QubesOS secpack
$ git clone https://github.com/QubesOS/qubes-secpack.git
$ cd qubes-secpack
$ gpg --import keys/*/*
gpg: key C37BB66B: public key "Joanna Rutkowska (Qubes OS signing key) <joanna@invisiblethingslab.com>" imported
gpg: key 1E30A75D: public key "Joanna Rutkowska (Qubes OS signing key) <joanna@invisiblethingslab.com>" imported
gpg: key 74EADABC: public key "Joanna Rutkowska (Qubes OS signing key) <joanna@invisiblethingslab.com>" imported
gpg: key 65EF29CA: public key "Joanna Rutkowska (Qubes OS Signing Key) <joanna@invisiblethingslab.com>" imported
gpg: key 34898310: public key "Joanna Rutkowska (Qubes OS Signing Key) <joanna@invisiblethingslab.com>" imported
@frntn
frntn / keybase.md
Last active March 26, 2018 23:46
Misc

Uploading private keys

https://github.com/keybase/keybase-issues/issues/160#issuecomment-37070418
@frntn
frntn / gopass_binary_test.sh
Created September 18, 2017 20:58
Gopass Binary Test
#!/bin/bash
echo -n $'\x63\x61\x74' > before.txt
echo -n $'\x63\n\x61\n\x74\n' > before_lf.txt
echo -n $'\x63\r\n\x61\r\n\x74\r\n' > before_crlf.txt
echo -n $'\x63\r\x61\r\x74\r' > before_cr.txt
echo -n $'\x01\x63\x61\x74' > before.bin
echo -n $'\x01\x63\n\x61\n\x74\n' > before_lf.bin
echo -n $'\x01\x63\r\n\x61\r\n\x74\r\n' > before_crlf.bin