Skip to content

Instantly share code, notes, and snippets.

@mcenirm
mcenirm / README.md
Created January 9, 2017 19:18
Remote desktop (RDP) via SSH tunnel (using Microsoft Remote Desktop for Mac)

Description

Connect to remote desktop services via a bastion host using an SSH tunnel. Helpful when you have SSH access to a (eg, Linux) server with network access to the remote desktop hosts.

This works with Mac OS X, because it comes with SSH and Microsoft makes a pretty good RD client for Mac. The same overall approach should work with other SSH clients and other RD clients.

Note: This approach is not recommended for anyone. Instead, one should use a Remote Desktop Gateway (on Windows Server) or a real VPN.

Setup

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active October 18, 2025 10:01
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}