gpt4 book ai didi

ubuntu - ssh/known_hosts : No such file or directory

转载 作者:行者123 更新时间:2023-12-04 18:29:34 26 4
gpt4 key购买 nike

关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。












我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为 on-topic对于堆栈溢出。


12 个月前关闭。







Improve this question




所以我正在设置 GitLab,但在此过程中遇到了一个问题。即,https://docs.gitlab.com/ee/user/gitlab_com/index.html#ssh-host-keys-fingerprints此链接要求将条目添加到 known_hosts .然而,问题是,当我试图运行像 /.ssh$ .ssh/known_hosts gitlab.com ssh-ed25519 ... 这样的命令时我得到这个错误。
我刚刚从头开始设置了这个 ssh 的东西。

最佳答案

apparently I don't even have that file in the first place. Is there a way to create it?


它将在您的第一个 ssh 上为您创建称呼
ssh -T git@gitlab.com
这将触发如下消息:
The authenticity of host '111.222.333.444 (111.222.333.444)' can't be established.
RSA key fingerprint is f1:cf:58:ae:71:0b:c8:04:6f:34:a6:b2:e4:1e:0c:8b.
Are you sure you want to continue connecting (yes/no)?
回答"is"将创建 ~/.ssh/known_hosts
chepnerthe comments 中说,您应该在回答"is"之前提前获取服务器的实际指纹,并将该指纹与添加到 ~/.ssh/known_hosts 中的指纹进行比较。 .
例如,参见“ Securely add a host (e.g. GitHub) to the SSH known_hosts file”。
例如: github.com give its server fingerprints : 与 ssh-keyscan -t rsa github.com | ssh-keygen -lf - 进行比较.
C:\Users\vonc\git>ssh-keyscan -t rsa github.com | ssh-keygen -lf -
# github.com:22 SSH-2.0-babeld-4cec2db4
2048 SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 github.com (RSA)
如果匹配,则将其添加到您的 ~/.ssh/known_hosts .

关于ubuntu - ssh/known_hosts : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68332819/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com