SSH keeps asking for my passphrase
I would like to use two different services that use public key authentification, without having to always input my pass-phrase.
What I want:
- to be able to type
git pullwithout entering my login/password or my passphrase - to be able to type
gcloud [...] ssh [...]without entering my passphrase each time.
As of today:
git pulldoes not ask me to enter my credentials, they are stored inside~/.ssh/id_rsaand~/.ssh/id_rsa.pub.
gcloud ... ssh ...always ask me to enter my passphrase:
$ gcloud ... ssh ...
sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/BeChillerToo/.ssh/google':
This is the content of my ~/.ssh/config:
IdentityFile ~/.ssh/google
IdentityFile ~/.ssh/id_rsa
And the content of /etc/ssh/ssh_config:
Host *
PasswordAuthentication yes
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
EDIT:
My keys seem to be badly added.
Here's the result of ssh-add -l after I boot:
2048 SHA256:+nCvs...CUM+DHqA4 chill@laptop (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)
And then after I add the google-compute-engine key:
2048 SHA256:+nCvs...CUM+DHqA4 /home/chill/.ssh/google_compute_engine (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)
The key related to chill@work-mail.com is the one I use for Github, hence why I don't have to provide credentials to git pull.
And I suspect that the first key (the one that switches from chill@laptop to /home/chill/.ssh/google_compute_engine) is the one causing the problem with gcloud:
$ gcloud compute ... ssh ...
sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/chill/.ssh/google_compute_engine':
ssh
add a comment |
I would like to use two different services that use public key authentification, without having to always input my pass-phrase.
What I want:
- to be able to type
git pullwithout entering my login/password or my passphrase - to be able to type
gcloud [...] ssh [...]without entering my passphrase each time.
As of today:
git pulldoes not ask me to enter my credentials, they are stored inside~/.ssh/id_rsaand~/.ssh/id_rsa.pub.
gcloud ... ssh ...always ask me to enter my passphrase:
$ gcloud ... ssh ...
sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/BeChillerToo/.ssh/google':
This is the content of my ~/.ssh/config:
IdentityFile ~/.ssh/google
IdentityFile ~/.ssh/id_rsa
And the content of /etc/ssh/ssh_config:
Host *
PasswordAuthentication yes
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
EDIT:
My keys seem to be badly added.
Here's the result of ssh-add -l after I boot:
2048 SHA256:+nCvs...CUM+DHqA4 chill@laptop (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)
And then after I add the google-compute-engine key:
2048 SHA256:+nCvs...CUM+DHqA4 /home/chill/.ssh/google_compute_engine (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)
The key related to chill@work-mail.com is the one I use for Github, hence why I don't have to provide credentials to git pull.
And I suspect that the first key (the one that switches from chill@laptop to /home/chill/.ssh/google_compute_engine) is the one causing the problem with gcloud:
$ gcloud compute ... ssh ...
sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/chill/.ssh/google_compute_engine':
ssh
add a comment |
I would like to use two different services that use public key authentification, without having to always input my pass-phrase.
What I want:
- to be able to type
git pullwithout entering my login/password or my passphrase - to be able to type
gcloud [...] ssh [...]without entering my passphrase each time.
As of today:
git pulldoes not ask me to enter my credentials, they are stored inside~/.ssh/id_rsaand~/.ssh/id_rsa.pub.
gcloud ... ssh ...always ask me to enter my passphrase:
$ gcloud ... ssh ...
sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/BeChillerToo/.ssh/google':
This is the content of my ~/.ssh/config:
IdentityFile ~/.ssh/google
IdentityFile ~/.ssh/id_rsa
And the content of /etc/ssh/ssh_config:
Host *
PasswordAuthentication yes
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
EDIT:
My keys seem to be badly added.
Here's the result of ssh-add -l after I boot:
2048 SHA256:+nCvs...CUM+DHqA4 chill@laptop (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)
And then after I add the google-compute-engine key:
2048 SHA256:+nCvs...CUM+DHqA4 /home/chill/.ssh/google_compute_engine (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)
The key related to chill@work-mail.com is the one I use for Github, hence why I don't have to provide credentials to git pull.
And I suspect that the first key (the one that switches from chill@laptop to /home/chill/.ssh/google_compute_engine) is the one causing the problem with gcloud:
$ gcloud compute ... ssh ...
sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/chill/.ssh/google_compute_engine':
ssh
I would like to use two different services that use public key authentification, without having to always input my pass-phrase.
What I want:
- to be able to type
git pullwithout entering my login/password or my passphrase - to be able to type
gcloud [...] ssh [...]without entering my passphrase each time.
As of today:
git pulldoes not ask me to enter my credentials, they are stored inside~/.ssh/id_rsaand~/.ssh/id_rsa.pub.
gcloud ... ssh ...always ask me to enter my passphrase:
$ gcloud ... ssh ...
sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/BeChillerToo/.ssh/google':
This is the content of my ~/.ssh/config:
IdentityFile ~/.ssh/google
IdentityFile ~/.ssh/id_rsa
And the content of /etc/ssh/ssh_config:
Host *
PasswordAuthentication yes
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
EDIT:
My keys seem to be badly added.
Here's the result of ssh-add -l after I boot:
2048 SHA256:+nCvs...CUM+DHqA4 chill@laptop (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)
And then after I add the google-compute-engine key:
2048 SHA256:+nCvs...CUM+DHqA4 /home/chill/.ssh/google_compute_engine (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)
The key related to chill@work-mail.com is the one I use for Github, hence why I don't have to provide credentials to git pull.
And I suspect that the first key (the one that switches from chill@laptop to /home/chill/.ssh/google_compute_engine) is the one causing the problem with gcloud:
$ gcloud compute ... ssh ...
sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/chill/.ssh/google_compute_engine':
ssh
ssh
edited Jan 17 at 16:49
Be Chiller Too
asked Jan 17 at 13:03
Be Chiller TooBe Chiller Too
165
165
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:
$ eval $(ssh-agent)
## The output without the eval will look like this:
$ ssh-agent
ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
SSH_AGENT_PID=125895; export SSH_AGENT_PID;
echo Agent pid 125895;
After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add
$ ssh-add ~/.ssh/google
$ ssh-add ~/.ssh/id_rsa
With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:
## ~/.ssh/config
AddKeysToAgent yes
This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.
Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.
1
Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.
– Be Chiller Too
Jan 17 at 16:33
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2faskubuntu.com%2fquestions%2f1110546%2fssh-keeps-asking-for-my-passphrase%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:
$ eval $(ssh-agent)
## The output without the eval will look like this:
$ ssh-agent
ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
SSH_AGENT_PID=125895; export SSH_AGENT_PID;
echo Agent pid 125895;
After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add
$ ssh-add ~/.ssh/google
$ ssh-add ~/.ssh/id_rsa
With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:
## ~/.ssh/config
AddKeysToAgent yes
This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.
Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.
1
Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.
– Be Chiller Too
Jan 17 at 16:33
add a comment |
Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:
$ eval $(ssh-agent)
## The output without the eval will look like this:
$ ssh-agent
ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
SSH_AGENT_PID=125895; export SSH_AGENT_PID;
echo Agent pid 125895;
After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add
$ ssh-add ~/.ssh/google
$ ssh-add ~/.ssh/id_rsa
With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:
## ~/.ssh/config
AddKeysToAgent yes
This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.
Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.
1
Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.
– Be Chiller Too
Jan 17 at 16:33
add a comment |
Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:
$ eval $(ssh-agent)
## The output without the eval will look like this:
$ ssh-agent
ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
SSH_AGENT_PID=125895; export SSH_AGENT_PID;
echo Agent pid 125895;
After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add
$ ssh-add ~/.ssh/google
$ ssh-add ~/.ssh/id_rsa
With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:
## ~/.ssh/config
AddKeysToAgent yes
This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.
Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.
Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:
$ eval $(ssh-agent)
## The output without the eval will look like this:
$ ssh-agent
ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
SSH_AGENT_PID=125895; export SSH_AGENT_PID;
echo Agent pid 125895;
After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add
$ ssh-add ~/.ssh/google
$ ssh-add ~/.ssh/id_rsa
With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:
## ~/.ssh/config
AddKeysToAgent yes
This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.
Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.
edited 2 days ago
answered Jan 17 at 15:11
Simon SudlerSimon Sudler
1,471314
1,471314
1
Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.
– Be Chiller Too
Jan 17 at 16:33
add a comment |
1
Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.
– Be Chiller Too
Jan 17 at 16:33
1
1
Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.
– Be Chiller Too
Jan 17 at 16:33
Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.
– Be Chiller Too
Jan 17 at 16:33
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2faskubuntu.com%2fquestions%2f1110546%2fssh-keeps-asking-for-my-passphrase%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