에 github.com
SSH 키를 추가 했습니다 /etc/ssh/ssh_known_hosts
. 하지만 내가 달릴 때
git clone [email protected]:me/repo
나는 아직도 얻는다
Cloning into 'repo'...
The authenticity of host 'github.com (XXX.XXX.XXX.XXX)' can't be established.
RSA key fingerprint is SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no)?
~/.ssh/known_hosts
예상대로 작동하지만 프롬프트가 표시되지 않습니다./etc/ssh/ssh_known_hosts
여러 사용자가 있으므로 파일 을 사용하여 직접 작업하고 싶습니다 .'yes'
에서 실행 중이기 때문에을 입력 할 수도 없습니다 puppet
.StrictHostKeyChecking = no
.~/.ssh/config
파일 이 없습니다 .sshd
수정 후 다시 시작했습니다 /etc/ssh/ssh_known_hosts
.git을 강제로 사용하려면 어떻게해야 /etc/ssh/ssh_known_hosts
합니까?
편집 1 :
이것은 파일 /etc/ssh/ssh_config
( ~/.ssh/config
존재하지 않음)입니다.
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# IdentityFile ~/.ssh/id_ecdsa
# IdentityFile ~/.ssh/id_ed25519
# Port 22
# Protocol 2
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
그리고 이것은 내 /etc/ssh/ssh_known_hosts
:
# HEADER: This file was autogenerated at 2020-12-31 10:33:06 +0000
# HEADER: by puppet. While it can still be managed manually, it
# HEADER: is definitely not recommended.
gerrit.wikimedia.org ssh-rsa AAAAB3Nz[...]
github ssh-rsa AAAAB3NzAAAAB3Nz[...]
편집 2 :
모두에 대한 읽기 권한이 있습니다 /etc/ssh/ssh_known_hosts
.
vagrant@vagrant:~$ ls -la /etc/ssh/ssh_known_hosts
-rw-r--r-- 1 root root 795 Dec 31 10:33 /etc/ssh/ssh_known_hosts
알려진 호스트 파일의 형식이 잘못되었습니다. 각 줄의 첫 번째 항목은 연결하려는 시스템의 이름입니다. 이 경우 github.com
에는 일반이 아니라 이어야 github
합니다. 이것은 OpenSSH가 적절한 키를 찾는 데 사용하는 기술입니다.
을 사용하여 올바른 형식을 찾을 수 있습니다 ssh-keyscan github.com
.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다