macOS ssh Keys Get Removed Randomly
up vote
0
down vote
favorite
Using ssh-keygen
, I generated an ssh key. I did not use a passphrase. I added the identity with ssh-add
so I didn't have to enter credentials every time I used the key. I have regularly used these ssh keys over the past few months.
Every few weeks, I'm prompted for credentials when I use ssh, and have to re-add the ssh key in order to avoid that.
Does anyone have any suggestions?
ssh osx macintosh
|
show 2 more comments
up vote
0
down vote
favorite
Using ssh-keygen
, I generated an ssh key. I did not use a passphrase. I added the identity with ssh-add
so I didn't have to enter credentials every time I used the key. I have regularly used these ssh keys over the past few months.
Every few weeks, I'm prompted for credentials when I use ssh, and have to re-add the ssh key in order to avoid that.
Does anyone have any suggestions?
ssh osx macintosh
Does this coincide with you logging out and logging in again?
– Kusalananda
Nov 16 at 11:34
Sometimes yes, sometimes no. It's not consistent. What would a solution be if it did coincide with that?
– leftAsAnExerciseToTheReader
Nov 20 at 11:35
Ifssh
is not using your key after you have freshly logged in, it could be that yourssh-agent
was not yet given the key. Runssh-add
in that case.
– Kusalananda
Nov 20 at 11:59
The issue is that I have to runssh-add
for the same key at different points in time. It was my understanding thatssh-add
would add the key permanently. It's almost likessh-add
"forgets" the key was added.
– leftAsAnExerciseToTheReader
2 days ago
Are you starting an SSH agent explicitly on the command line at any point? I think macOS starts one by default.
– Kusalananda
2 days ago
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Using ssh-keygen
, I generated an ssh key. I did not use a passphrase. I added the identity with ssh-add
so I didn't have to enter credentials every time I used the key. I have regularly used these ssh keys over the past few months.
Every few weeks, I'm prompted for credentials when I use ssh, and have to re-add the ssh key in order to avoid that.
Does anyone have any suggestions?
ssh osx macintosh
Using ssh-keygen
, I generated an ssh key. I did not use a passphrase. I added the identity with ssh-add
so I didn't have to enter credentials every time I used the key. I have regularly used these ssh keys over the past few months.
Every few weeks, I'm prompted for credentials when I use ssh, and have to re-add the ssh key in order to avoid that.
Does anyone have any suggestions?
ssh osx macintosh
ssh osx macintosh
edited 2 days ago
asked Nov 16 at 9:02
leftAsAnExerciseToTheReader
13
13
Does this coincide with you logging out and logging in again?
– Kusalananda
Nov 16 at 11:34
Sometimes yes, sometimes no. It's not consistent. What would a solution be if it did coincide with that?
– leftAsAnExerciseToTheReader
Nov 20 at 11:35
Ifssh
is not using your key after you have freshly logged in, it could be that yourssh-agent
was not yet given the key. Runssh-add
in that case.
– Kusalananda
Nov 20 at 11:59
The issue is that I have to runssh-add
for the same key at different points in time. It was my understanding thatssh-add
would add the key permanently. It's almost likessh-add
"forgets" the key was added.
– leftAsAnExerciseToTheReader
2 days ago
Are you starting an SSH agent explicitly on the command line at any point? I think macOS starts one by default.
– Kusalananda
2 days ago
|
show 2 more comments
Does this coincide with you logging out and logging in again?
– Kusalananda
Nov 16 at 11:34
Sometimes yes, sometimes no. It's not consistent. What would a solution be if it did coincide with that?
– leftAsAnExerciseToTheReader
Nov 20 at 11:35
Ifssh
is not using your key after you have freshly logged in, it could be that yourssh-agent
was not yet given the key. Runssh-add
in that case.
– Kusalananda
Nov 20 at 11:59
The issue is that I have to runssh-add
for the same key at different points in time. It was my understanding thatssh-add
would add the key permanently. It's almost likessh-add
"forgets" the key was added.
– leftAsAnExerciseToTheReader
2 days ago
Are you starting an SSH agent explicitly on the command line at any point? I think macOS starts one by default.
– Kusalananda
2 days ago
Does this coincide with you logging out and logging in again?
– Kusalananda
Nov 16 at 11:34
Does this coincide with you logging out and logging in again?
– Kusalananda
Nov 16 at 11:34
Sometimes yes, sometimes no. It's not consistent. What would a solution be if it did coincide with that?
– leftAsAnExerciseToTheReader
Nov 20 at 11:35
Sometimes yes, sometimes no. It's not consistent. What would a solution be if it did coincide with that?
– leftAsAnExerciseToTheReader
Nov 20 at 11:35
If
ssh
is not using your key after you have freshly logged in, it could be that your ssh-agent
was not yet given the key. Run ssh-add
in that case.– Kusalananda
Nov 20 at 11:59
If
ssh
is not using your key after you have freshly logged in, it could be that your ssh-agent
was not yet given the key. Run ssh-add
in that case.– Kusalananda
Nov 20 at 11:59
The issue is that I have to run
ssh-add
for the same key at different points in time. It was my understanding that ssh-add
would add the key permanently. It's almost like ssh-add
"forgets" the key was added.– leftAsAnExerciseToTheReader
2 days ago
The issue is that I have to run
ssh-add
for the same key at different points in time. It was my understanding that ssh-add
would add the key permanently. It's almost like ssh-add
"forgets" the key was added.– leftAsAnExerciseToTheReader
2 days ago
Are you starting an SSH agent explicitly on the command line at any point? I think macOS starts one by default.
– Kusalananda
2 days ago
Are you starting an SSH agent explicitly on the command line at any point? I think macOS starts one by default.
– Kusalananda
2 days ago
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482100%2fmacos-ssh-keys-get-removed-randomly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does this coincide with you logging out and logging in again?
– Kusalananda
Nov 16 at 11:34
Sometimes yes, sometimes no. It's not consistent. What would a solution be if it did coincide with that?
– leftAsAnExerciseToTheReader
Nov 20 at 11:35
If
ssh
is not using your key after you have freshly logged in, it could be that yourssh-agent
was not yet given the key. Runssh-add
in that case.– Kusalananda
Nov 20 at 11:59
The issue is that I have to run
ssh-add
for the same key at different points in time. It was my understanding thatssh-add
would add the key permanently. It's almost likessh-add
"forgets" the key was added.– leftAsAnExerciseToTheReader
2 days ago
Are you starting an SSH agent explicitly on the command line at any point? I think macOS starts one by default.
– Kusalananda
2 days ago