gpg does not ask for password

Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
I encrypted one file with gpg -c <file> and closed the terminal. After a while, I tried to decrypt it with gpg <file> and it decrypted it, without asking for a password. Is that normal? How to guarantee that gpg will ask for a password, even in my same computer?
gpg
add a comment |Â
up vote
5
down vote
favorite
I encrypted one file with gpg -c <file> and closed the terminal. After a while, I tried to decrypt it with gpg <file> and it decrypted it, without asking for a password. Is that normal? How to guarantee that gpg will ask for a password, even in my same computer?
gpg
How long was it since you last entered you GnuPG password at that point? Thegpg-agentcaches it for 10 minutes by default (GnuPG 2.2).
â Kusalananda
Oct 3 '17 at 15:37
Was gpg-agent running? If so it would have cached the credentials (just tested this on my Mac with gpg-agent in memory).
â Petro
Oct 3 '17 at 15:49
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I encrypted one file with gpg -c <file> and closed the terminal. After a while, I tried to decrypt it with gpg <file> and it decrypted it, without asking for a password. Is that normal? How to guarantee that gpg will ask for a password, even in my same computer?
gpg
I encrypted one file with gpg -c <file> and closed the terminal. After a while, I tried to decrypt it with gpg <file> and it decrypted it, without asking for a password. Is that normal? How to guarantee that gpg will ask for a password, even in my same computer?
gpg
gpg
asked Oct 3 '17 at 15:31
Pierre B
5382522
5382522
How long was it since you last entered you GnuPG password at that point? Thegpg-agentcaches it for 10 minutes by default (GnuPG 2.2).
â Kusalananda
Oct 3 '17 at 15:37
Was gpg-agent running? If so it would have cached the credentials (just tested this on my Mac with gpg-agent in memory).
â Petro
Oct 3 '17 at 15:49
add a comment |Â
How long was it since you last entered you GnuPG password at that point? Thegpg-agentcaches it for 10 minutes by default (GnuPG 2.2).
â Kusalananda
Oct 3 '17 at 15:37
Was gpg-agent running? If so it would have cached the credentials (just tested this on my Mac with gpg-agent in memory).
â Petro
Oct 3 '17 at 15:49
How long was it since you last entered you GnuPG password at that point? The
gpg-agent caches it for 10 minutes by default (GnuPG 2.2).â Kusalananda
Oct 3 '17 at 15:37
How long was it since you last entered you GnuPG password at that point? The
gpg-agent caches it for 10 minutes by default (GnuPG 2.2).â Kusalananda
Oct 3 '17 at 15:37
Was gpg-agent running? If so it would have cached the credentials (just tested this on my Mac with gpg-agent in memory).
â Petro
Oct 3 '17 at 15:49
Was gpg-agent running? If so it would have cached the credentials (just tested this on my Mac with gpg-agent in memory).
â Petro
Oct 3 '17 at 15:49
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
This is normal, gpg now uses gpg-agent to manage private keys, and the agent caches keys for a certain amount of time (up to two hours by default, with a ten minute inactivity timeout).
To change the defaults, create or edit a file named ~/.gnupg/gpg-agent.conf, and use the following entries:
default-cache-ttlspecifies the amount of time a cache entry is kept after its last use, in seconds (600 by default);max-cache-ttlspecifies the maximum amount of time a cache entry is kept, in seconds (7200 by default).
After changing these, youâÂÂll need to reload the configuration (try sending SIGHUP to gpg-agent, or killing it outright).
add a comment |Â
up vote
0
down vote
Is your private key tied to a password? This is something you set at key creation time.
If not, GPG won't ask for a password, as none is required. It will simply rely on the key you provide.
And if so, should you have entered your password during another operation right before, GPG will not ask for this password again until a few minutes have passed.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
This is normal, gpg now uses gpg-agent to manage private keys, and the agent caches keys for a certain amount of time (up to two hours by default, with a ten minute inactivity timeout).
To change the defaults, create or edit a file named ~/.gnupg/gpg-agent.conf, and use the following entries:
default-cache-ttlspecifies the amount of time a cache entry is kept after its last use, in seconds (600 by default);max-cache-ttlspecifies the maximum amount of time a cache entry is kept, in seconds (7200 by default).
After changing these, youâÂÂll need to reload the configuration (try sending SIGHUP to gpg-agent, or killing it outright).
add a comment |Â
up vote
5
down vote
This is normal, gpg now uses gpg-agent to manage private keys, and the agent caches keys for a certain amount of time (up to two hours by default, with a ten minute inactivity timeout).
To change the defaults, create or edit a file named ~/.gnupg/gpg-agent.conf, and use the following entries:
default-cache-ttlspecifies the amount of time a cache entry is kept after its last use, in seconds (600 by default);max-cache-ttlspecifies the maximum amount of time a cache entry is kept, in seconds (7200 by default).
After changing these, youâÂÂll need to reload the configuration (try sending SIGHUP to gpg-agent, or killing it outright).
add a comment |Â
up vote
5
down vote
up vote
5
down vote
This is normal, gpg now uses gpg-agent to manage private keys, and the agent caches keys for a certain amount of time (up to two hours by default, with a ten minute inactivity timeout).
To change the defaults, create or edit a file named ~/.gnupg/gpg-agent.conf, and use the following entries:
default-cache-ttlspecifies the amount of time a cache entry is kept after its last use, in seconds (600 by default);max-cache-ttlspecifies the maximum amount of time a cache entry is kept, in seconds (7200 by default).
After changing these, youâÂÂll need to reload the configuration (try sending SIGHUP to gpg-agent, or killing it outright).
This is normal, gpg now uses gpg-agent to manage private keys, and the agent caches keys for a certain amount of time (up to two hours by default, with a ten minute inactivity timeout).
To change the defaults, create or edit a file named ~/.gnupg/gpg-agent.conf, and use the following entries:
default-cache-ttlspecifies the amount of time a cache entry is kept after its last use, in seconds (600 by default);max-cache-ttlspecifies the maximum amount of time a cache entry is kept, in seconds (7200 by default).
After changing these, youâÂÂll need to reload the configuration (try sending SIGHUP to gpg-agent, or killing it outright).
answered Oct 3 '17 at 15:37
Stephen Kitt
145k22317382
145k22317382
add a comment |Â
add a comment |Â
up vote
0
down vote
Is your private key tied to a password? This is something you set at key creation time.
If not, GPG won't ask for a password, as none is required. It will simply rely on the key you provide.
And if so, should you have entered your password during another operation right before, GPG will not ask for this password again until a few minutes have passed.
add a comment |Â
up vote
0
down vote
Is your private key tied to a password? This is something you set at key creation time.
If not, GPG won't ask for a password, as none is required. It will simply rely on the key you provide.
And if so, should you have entered your password during another operation right before, GPG will not ask for this password again until a few minutes have passed.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Is your private key tied to a password? This is something you set at key creation time.
If not, GPG won't ask for a password, as none is required. It will simply rely on the key you provide.
And if so, should you have entered your password during another operation right before, GPG will not ask for this password again until a few minutes have passed.
Is your private key tied to a password? This is something you set at key creation time.
If not, GPG won't ask for a password, as none is required. It will simply rely on the key you provide.
And if so, should you have entered your password during another operation right before, GPG will not ask for this password again until a few minutes have passed.
edited Oct 3 '17 at 16:32
Faheem Mitha
22.2k1676133
22.2k1676133
answered Oct 3 '17 at 15:37
Shlublu
1737
1737
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395875%2fgpg-does-not-ask-for-password%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
How long was it since you last entered you GnuPG password at that point? The
gpg-agentcaches it for 10 minutes by default (GnuPG 2.2).â Kusalananda
Oct 3 '17 at 15:37
Was gpg-agent running? If so it would have cached the credentials (just tested this on my Mac with gpg-agent in memory).
â Petro
Oct 3 '17 at 15:49