I was initially using bash to work in git and have started using zsh now in Hyper. How can I add the SSH key that I was using to push to github from bash with zsh now?
Asked
Active
Viewed 3,994 times
2
-
1ssh keys are not shell specific. Your keys should work no matter which shell you use. – Socowi Dec 02 '18 at 19:46
-
I thought so but I have to put in my credentials every time I push in zsh but not in bash. Do I need to add an environment variable to zsh? – Stephan Dec 02 '18 at 19:47
-
ssh keys are usually in `.ssh/..`. located. to add a key in a shell - is in real `ssh-add` for adding a key to an ssh agent. then it will be used from `ssh` while connecting to a server – devanand Dec 02 '18 at 19:48
-
1Maybe Hyperterminal is the problem. I never heard of that software before, but it seems like HyperTerminal is a standalone windows application and not part of the windows subsystem for linux. If so, then `.ssh/` may not be found, because it is not in your home directory (wherever that would be in the case of HyperTerminal). – Socowi Dec 02 '18 at 19:49
-
well, that explains why I can't find it in Hyper. Their windows support is definitely lacking at the moment. – Stephan Dec 02 '18 at 19:58
-
actually, zsh is running on WSL so I'm not sure what the deal is. It would create problems if I added a second key right? – Stephan Dec 03 '18 at 00:49
-
1@Steve depends on how you want to use and configure that key. I used to have five keys or so, one per server, without problems. However, having two different keys on the same client that are accepted by the same servers does not make any sense to me. When you have a different `.ssh` directory for HyperTerminal you could just copy or link your existing key. – Socowi Dec 03 '18 at 07:45