ssh

web | awesome | etc

Notes

Generate key

Basic generation:

ssh-keygen -t rsa -C "comment"

Specific filename:

ssh-keygen -t rsa -f ~/.ssh/filename_rsa -C "comment"

Then add file(s) to agent:

ssh-add #adds default filenames
ssh-add path/to/file #add specific file

Then confirm:

ssh-add -l

Multiple users at one host

Host username1@hostname.example.com
  Hostname hostname.example.com
  User username1
  IdentityFile ~/.ssh/rsa1

Host username2@hostname.example.com
  Hostname hostname.example.com
  User username2
  IdentityFile ~/.ssh/rsa2

You could contract the Host alias to a keyword, but I prefer to stick to an alias similar to the typical user@full.address convention.

For GitHub, see:



Backlinks: sshuttle ldap mosh virtualbox:headless-guest

CC0 / Public domain dedication To the extent possible under law, d3vid seaward has waived all copyright and related or neighboring rights to "ssh in Grasmere notebook, including code snippets" (why? how?)