I am trying to upload my first project at Github.com, for that i am following the steps:
During Setup Generating a new SSH key
- Opened Git Bash
$ ssh-keygen -t rsa -b 4096 -C "myemail@example.com"
(This command is working properly)
Output:
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/abc/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/abc/.ssh/id_rsa
Your public key has been saved in /c/Users/abc/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:rJwyia2U0ENuNL0Gqf+NjXqqUa0Gdkffjdkfjdkjdkj myemail@example.com
The key's randomart image is:..................
..........................................
=============== ================= ===========================
Then i run the command..........
$ cat /c/Users/abc/.ssh/id_rsa.pub
cat: /c/Users/abc: No such file or directory
cat: abc/.ssh/id_rsa.pub: No such file or directory
Even i go to this path and check this file is available there.....
================= =================
Even if i run this command---
$ cat ~/.ssh/id_rsa.pub
it is showing the Key data of this file
============= =====================
I found one more command to solve this problem to save key in file---
$ ssh-keygen -t rsa -b 4096 -C "myemail@example.com" -f /path/to/key
Output:
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key "/path/to/key" failed: No such file or directory