2017-12-02 42 views
1

gpg-agent를 ssh 에이전트로 작동 시키려고했지만 행운이 없었습니다. Linux Mint (Sarah)의 KDE 버전을 실행 중입니다.gpg-agent를 ssh 에이전트로 사용할 수 없습니다.

> $ cat ~/.gnupg/gpg-agent.conf                                
enable-ssh-support 
: 다음

# $Id: Xsession.options 189 2005-06-11 00:04:27Z branden $ 
# 
# configuration options for /etc/X11/Xsession 
# See Xsession.options(5) for an explanation of the available options. 
allow-failsafe 
allow-user-resources 
allow-user-xsession 
#use-ssh-agent 
use-session-dbus 

, 내가 GPG 에이전트에서 SSH 에이전트 지원을 활성화 :

첫째, 내장 /etc/X11/Xsession.options에서 ssh를 에이전트 비활성화 이 시점에서

나는 내 PC를 다시 시작하고, 내 환경 변수 확인 :

> $ echo $GPG_AGENT_INFO                                 
/home/jeroen/.gnupg/S.gpg-agent:0:1 

> $ echo $SSH_AUTH_SOCK                                  
/home/jeroen/.gnupg/S.gpg-agent.ssh 

그냥 다른 에이전트가 실행되고 있지 확인하기 :

> $ ps aux | grep agent                                  
jeroen 5072 0.0 0.0 282604 764 ?  Ss Nov24 0:15 /usr/bin/gpg-agent --daemon 
jeroen 5265 0.0 0.1 697044 29032 ?  Sl Nov24 0:01 /usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1 
jeroen 9574 0.0 0.0 130292 1016 pts/6 S+ 12:15 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn agent 

지금까지 모든 것이 잘 어울립니다. 그럼 내 gpg 키를 살펴 보겠습니다 :

pub rsa2048/03AB1CB5 2015-06-12 [SC] 
uid   [ultimate] Jeroen Jacobs <[email protected]> 
uid   [ultimate] Jeroen Jacobs <[email protected]> 
sub rsa2048/014F9774 2015-06-12 [E] 
sub rsa2048/0FEF1A6F 2017-11-23 [A] 

확인 하위 키가 있습니다. gpg-agent가 이걸 가져 왔 겠지?

ssh-add -l                                    
The agent has no identities. 

글쎄, 그건 ... 이미 내 PC를 다시 부팅했지만 차이는 없습니다. 주제에 대한 거의 모든 자습서를 읽었으며 책으로 모든 것을 해냈다 고 생각합니다. 그러나 제대로 작동하지는 않습니다.

다만 경우에 당신은, gpg2 및 GPG 에이전트의 버전이 필요합니다 당신이 (sshcontrol 파일

gpg -k --with-keygrip로 인증 활성화 하위 키의 keygrip를 추가 추출하려면이 명령을 사용해야합니다

> $ gpg2 --version                                   
gpg (GnuPG) 2.1.11 
libgcrypt 1.6.5 
Copyright (C) 2016 Free Software Foundation, Inc. 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This is free software: you are free to change and redistribute it. 
There is NO WARRANTY, to the extent permitted by law. 

Home: ~/.gnupg 
Supported algorithms: 
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA 
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, 
     CAMELLIA128, CAMELLIA192, CAMELLIA256 
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 
Compression: Uncompressed, ZIP, ZLIB, BZIP2 

> $ gpg-agent --version                                  
gpg-agent (GnuPG) 2.1.11 
libgcrypt 1.6.5 
Copyright (C) 2016 Free Software Foundation, Inc. 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This is free software: you are free to change and redistribute it. 
There is NO WARRANTY, to the extent permitted by law. 
+0

GPG에서 ssh 에이전트 지원은 인증 서브 키를 추출하는 방법을 알고 있습니까? 나는 그것이 표준 ssh 에이전트를 대신하는 것이라고 생각하고,'ssh-add'를 사용하여 수동으로 키를 추가해야 할 것이다. – larsks

답변

0

을 키 그립)