Skip to content

Instantly share code, notes, and snippets.

View liukch's full-sized avatar

liukch

  • kingsoft.com
  • Beijing, China
View GitHub Profile
@liukch
liukch / openssl.md
Created November 17, 2021 12:54 — forked from zhiguangwang/openssl.md
Common OpenSSL Commands with Keys and Certificates

Common OpenSSL Commands with Keys and Certificates

Generate RSA private key (2048 bit)

openssl genrsa -out private.pem 2048

Generate a Certificate Signing Request (CSR)

openssl req -sha256 -new -key private.pem -out csr.pem
@liukch
liukch / README.md
Last active February 8, 2022 06:21 — forked from zhiguangwang/README.md
SSH Tunnelling
ssh-tunnel() { nohup ssh -o ServerAliveInterval=15 -f -N -L ${1}:${2} ${3} > /dev/null 2>&1; }

Usage

ssh-tunnel <local-port> <remote-host>:<remote-port> <bastion>
@liukch
liukch / README.md
Created December 22, 2020 02:14 — forked from zhiguangwang/README.md
Show the environment variables of a running process in Linux
sudo cat /proc/<pid>/environ | tr '\0' '\n'
@liukch
liukch / README.md
Created December 22, 2020 02:11 — forked from zhiguangwang/README.md
Remove password requirement from group sudo when using command "sudo"

Ubuntu

echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/50-group-sudo-nopasswd