Linux Commands

A list of linux commands I always forget

  • pbcopy – send file to clipboard
    • pbcopy < ~/.ssh/id_ed25519.pub
  • Public IP address:
    • curl ifconfig.me
  • SSH Key Gen
    • ssh-keygen -t ed25519 -b 4096 -C “[email]” -f [filename]
    • ssh-copy-id -i ~/.ssh/[filename].pub [user]@[host]
    • Update ~/.ssh/config with :
Host custom_hostname
    HostName server_ip
    User user
    IdentityFile ~/.ssh/[filename]

ex

Host github.com
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/mikesmac_github


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *