Skip to content

Instantly share code, notes, and snippets.

@adithayyil
Last active February 22, 2024 03:15
Show Gist options
  • Save adithayyil/51fc2584d3375b0ecd27fc713ae4df2d to your computer and use it in GitHub Desktop.
Save adithayyil/51fc2584d3375b0ecd27fc713ae4df2d to your computer and use it in GitHub Desktop.
useful stuff so i dont forget T_T

Generate new ssh keys using ssh-keygen

The algorithm is selected using the -t option and key size using the -b option.

ssh-keygen -t rsa -b 4096
ssh-keygen -t dsa 
ssh-keygen -t ecdsa -b 521
ssh-keygen -t ed25519

Create a ssh shortcut

In .ssh/config:

Host hfcs
      Hostname hfcs.csclub.uwaterloo.ca
      Port 22
      User athayyil
      IdentityFile ~/.ssh/csc24

Run a sudo command without sudo password

In /etc/sudoers:

user ALL=(root) NOPASSWD: /path/to/binary

Restart all docker containers

$ docker restart $(docker ps -a -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment