Enter file in which to save the key (C:\Users\Administrator/.ssh/id_rsa):
时间: 2024-03-12 17:46:26 浏览: 128
在配置SSH免密登录时报错:/usr/bin/ssh-copy-id: ERROR: failed to open ID file ‘/root/.pub’: 没有那个文件或目录
这个提示是在生成 SSH 密钥时出现的,它询问你密钥保存的路径和文件名。默认情况下,SSH 密钥会保存在当前用户的 `.ssh` 目录下,并以 `id_rsa` 和 `id_rsa.pub` 命名。
如果你想修改密钥保存的路径和文件名,可以按照以下方式进行:
1. 在保存路径后,输入你想要保存的文件名,例如 `my_key`,然后按回车键。
```
Enter file in which to save the key (C:\Users\Administrator/.ssh/id_rsa): C:\Users\Administrator\.ssh\my_key
```
2. 如果路径不存在,Git 会提示你是否创建该路径。输入 `yes` 并按回车键,Git 会自动创建该路径。
```
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:\Users\Administrator\.ssh\my_key.
Your public key has been saved in C:\Users\Administrator\.ssh\my_key.pub.
The key fingerprint is:
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx your_email@example.com
The key's randomart image is:
+---[RSA 2048]----+
| xxxxxxxxx |
| xxxxxxxxxxx|
| xxxxxxxxx |
| xxxxxxxxx |
| xxxxxxxxx |
| xxxxxxxxx |
| xxxxxxxxx |
| xxxxxxxxx |
| xxxxxxxxx |
+----[SHA256]-----+
```
希望这个回答能够帮到你。如果你有其他问题,请随时问我。
阅读全文