Yubikey 4가 있고 여기에 저장된 GPG 키를 사용하여 SSH 서버에 인증하고 싶습니다.
먼저 GitHub를 사용하고 싶습니다. 이미 GPG 인증 키를 GitHub에 추가했습니다.
내 문제는 내가 ssh를 할 때 에이전트가이 키를 사용하지 않는다는 것입니다. 내 VPS에 연결을 시도하여 확인 ssh -v
했지만 내 GPG 키를 건너 뜁니다. 내 Yubikey가 연결되어 gpg2 --card-status
모든 세부 정보를 표시합니다. 서명 및 암호 해독은 물론 Yubikey의 다른 기능을 사용할 수 있습니다.
ssh 출력
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/wilhelm/.ssh/id_rsa
debug1: Trying private key: /home/wilhelm/.ssh/id_dsa
debug1: Trying private key: /home/wilhelm/.ssh/id_ecdsa
debug1: Trying private key: /home/wilhelm/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).
그놈 암호 관리자를 비활성화했습니다.
SSH 및 Git을 gpg-agent 에 연결 하고 제안을 따랐지만 작동하지 않는 것 같습니다.
╰─ ssh-add -l
Could not open a connection to your authentication agent.
╰─ ps aux | grep gpg-agent
wilhelm 26079 0.0 0.0 20268 980 ? Ss 20:57 0:00 gpg-agent --daemon --enable-ssh-support --sh
wilhelm 31559 0.0 0.0 12724 2184 pts/1 S+ 22:49 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn gpg-agent
ssh
gpg-agent
당신이 그렇게 할 방법을주지 않으면 당신과의 연결을 열 수 없습니다 .
gpg-agent
with --enable-ssh-support
옵션 을 시작 하면 .NET을 사용할 쉘에서 사용할 수 있어야하는 환경 변수를 인쇄합니다 ssh
. 그것들을 얻는 방법은 거의 없습니다.
중지 gpg-agent
하고 셸에서 다음과 같이 한 번 더 시작하십시오 ssh
(이것이 가장 쉬운 테스트 방법입니다).
eval $(gpg-agent --daemon --enable-ssh-support --sh)
인증 소켓의 위치를 찾아 SSH_AUTH_SOCK
직접 환경 변수 설정
나중에 작동한다는 것을 알게되면의 매뉴얼 페이지에 따라 에이전트 시작을 설정해야 gpg-agent(1)
하므로 ~/.xsession
자동으로 시작 되도록 할 수 있습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다