使用ssh-keygen创建SSH密钥不会创建.ssh文件夹 [英] Creating a SSH key with ssh-keygen does not create the .ssh folder
问题描述
我试图用msysgit创建公钥/私钥rsa密钥对
pre> ssh-keygen -Cemail@email.com-t rsa
一切看起来都不错,我有信息
输入要保存密钥的文件(/ c / Users /user/.ssh/id_rsa)
然后我确认:
您的公钥已保存在project.pub中
但我无法访问该文件夹!它不存在,它甚至不是一个隐藏的文件夹。我不明白为什么它不会产生。我使用的是Windows 7 Ultimate。
刚创建我的密钥时没有任何问题(Seven Ultimate 64bits,msysgit 1.6.5.1.1367 .gcd48)
$ ssh-keygen -Cvonc @ xxxx-t rsa
生成public / private rsa密钥对。
输入要保存密钥的文件(/c/Users/VonC/.ssh/id_rsa):#只需按输入
#即可接受
#默认位置
输入密码(空密码):
再次输入相同的密码:
您的身份已保存在/c/Users/VonC/.ssh/id_rsa中。
您的公钥已保存在/c/Users/VonC/.ssh/id_rsa.pub中。
关键指纹是:
xx:yy:zz:aa:bb:cc:... vonc @ xxxx
结果:
VonC @ P〜/ .ssh
$ ls -alrt
total 10
-rw-r - r-- 1 VonC Administ 642 5月23日21:47 known_hosts
drwxr-xr-x 43 VonC Administ 16384 Jun 15 17:01 ..
-rw-r - r-- 1 VonC Administ 398 Jun 19 16:14 id_rsa.pub
-rw-r - r-- 1 VonC Administ 1675 Jun 19 16:14 id_rsa
drwxr-xr-x 2 VonC Administ 0 Jun 19 16:14。
您可以检查您的bash会话中您的 $ HOME
环境变量是否设置?
VonC @ P〜/ .ssh
$ env | grep HOME
HOMEPATH = \ Users \VonC
HOME = / c / Users / VonC#< ===必须正确设置
HOMEDRIVE = C:
I am trying to create my public/private rsa key pair with msysgit
I run this command:
ssh-keygen -C "email@email.com" -t rsa
Everything looks fine, I have the message
Enter file in which to save the key (/c/Users/user/.ssh/id_rsa)
Then I have the confirmation:
Your public key has been saved in project.pub
But I can't access the folder! It does not exist, it is not even an hidden folder. I don't understand why it does not generate. I am using Windows 7 Ultimate.
Just created my key without any problem (Seven Ultimate 64bits, msysgit 1.6.5.1.1367.gcd48)
$ ssh-keygen -C "vonc@xxxx" -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/VonC/.ssh/id_rsa):# just press enter
# to accept the
# default location
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/VonC/.ssh/id_rsa.
Your public key has been saved in /c/Users/VonC/.ssh/id_rsa.pub.
The key fingerprint is:
xx:yy:zz:aa:bb:cc:... vonc@xxxx
With the result:
VonC@P ~/.ssh
$ ls -alrt
total 10
-rw-r--r-- 1 VonC Administ 642 May 23 21:47 known_hosts
drwxr-xr-x 43 VonC Administ 16384 Jun 15 17:01 ..
-rw-r--r-- 1 VonC Administ 398 Jun 19 16:14 id_rsa.pub
-rw-r--r-- 1 VonC Administ 1675 Jun 19 16:14 id_rsa
drwxr-xr-x 2 VonC Administ 0 Jun 19 16:14 .
Could you check in your bash session what value your $HOME
environment variable is set?
VonC@P ~/.ssh
$ env|grep HOME
HOMEPATH=\Users\VonC
HOME=/c/Users/VonC # <=== this must be correctly set
HOMEDRIVE=C:
这篇关于使用ssh-keygen创建SSH密钥不会创建.ssh文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!