generating SSH key for github: "zsh: command not found: $"

Viewed 11265
3 Answers

$ is what you see in sh. In zsh you probably see [path@user] $ or something like that. You just mustn't copy this dollar sign. What you copy should by ONLY:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Runing it in bash instead works for me exec bash then ssh-add -K ~/.ssh/id_ed25519

And you can switch back to zsh by exec zsh

avoid copying dollar sign while generation ssh keys. use this ----> ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Related