# If you are using a legacy system that doesn't support the Ed25519 algorithm, use: $ ssh-keygen -t rsa -b 4096 -C "your_email@example.com" -f "github-username"
-C stands for comment to help identify your ssh key
-f stands for the file name where your ssh key get
saved
1 2 3
> Enter passphrase (empty for no passphrase): [Type a passphrase] > > Enter same passphrase again: [Type passphrase again]
添加密钥到ssh-agent
1 2
$ ssh-add [--apple-use-keychain] ~/.ssh/github-username # The --apple-use-keychain option is in Apple's standard version of ssh-add. In MacOS versions prior to Monterey (12.0), the --apple-use-keychain and --apple-load-keychain flags used the syntax -K and -A, respectively.
> Hi github-username! You've successfully authenticated, but GitHub does not provide shell access. > Hi another-github-username! You've successfully authenticated, but GitHub does not provide shell access.