SSH Password prompt for a password after ssh keys are configured
Although I placed my public key on the remote machine yet I am still getting the ssh password prompt, here's my ssh -vv
output (just the last rows) that might help:
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/lior/.ssh/id_rsa <-- THAT's MY PRIVATE KEY!
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/lior/.ssh/id_dsa
debug1: Trying private key: /Users/lior/.ssh/id_ecdsa
debug1: Trying private key: /Users/lior/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
Important: I am able to ssh to other machines without password after doing the same procedure, so I assume the problem is on the specific remote machine (which runs on CentOS 6).
Any ideas?
ssh
bumped to the homepage by Community♦ 7 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
Although I placed my public key on the remote machine yet I am still getting the ssh password prompt, here's my ssh -vv
output (just the last rows) that might help:
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/lior/.ssh/id_rsa <-- THAT's MY PRIVATE KEY!
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/lior/.ssh/id_dsa
debug1: Trying private key: /Users/lior/.ssh/id_ecdsa
debug1: Trying private key: /Users/lior/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
Important: I am able to ssh to other machines without password after doing the same procedure, so I assume the problem is on the specific remote machine (which runs on CentOS 6).
Any ideas?
ssh
bumped to the homepage by Community♦ 7 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
I'd create an ~/.ssh/config file and add an entry for your server. linux.die.net/man/5/ssh_config
– ryekayo
Nov 14 '16 at 13:44
The key is rejected by the server. Make sure the server is properly configured to accept your key (permissions, SELinux labels).
– Jakuje
Nov 14 '16 at 14:27
add a comment |
Although I placed my public key on the remote machine yet I am still getting the ssh password prompt, here's my ssh -vv
output (just the last rows) that might help:
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/lior/.ssh/id_rsa <-- THAT's MY PRIVATE KEY!
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/lior/.ssh/id_dsa
debug1: Trying private key: /Users/lior/.ssh/id_ecdsa
debug1: Trying private key: /Users/lior/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
Important: I am able to ssh to other machines without password after doing the same procedure, so I assume the problem is on the specific remote machine (which runs on CentOS 6).
Any ideas?
ssh
Although I placed my public key on the remote machine yet I am still getting the ssh password prompt, here's my ssh -vv
output (just the last rows) that might help:
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/lior/.ssh/id_rsa <-- THAT's MY PRIVATE KEY!
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/lior/.ssh/id_dsa
debug1: Trying private key: /Users/lior/.ssh/id_ecdsa
debug1: Trying private key: /Users/lior/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
Important: I am able to ssh to other machines without password after doing the same procedure, so I assume the problem is on the specific remote machine (which runs on CentOS 6).
Any ideas?
ssh
ssh
asked Nov 14 '16 at 12:09
BroshiBroshi
11615
11615
bumped to the homepage by Community♦ 7 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 7 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
I'd create an ~/.ssh/config file and add an entry for your server. linux.die.net/man/5/ssh_config
– ryekayo
Nov 14 '16 at 13:44
The key is rejected by the server. Make sure the server is properly configured to accept your key (permissions, SELinux labels).
– Jakuje
Nov 14 '16 at 14:27
add a comment |
I'd create an ~/.ssh/config file and add an entry for your server. linux.die.net/man/5/ssh_config
– ryekayo
Nov 14 '16 at 13:44
The key is rejected by the server. Make sure the server is properly configured to accept your key (permissions, SELinux labels).
– Jakuje
Nov 14 '16 at 14:27
I'd create an ~/.ssh/config file and add an entry for your server. linux.die.net/man/5/ssh_config
– ryekayo
Nov 14 '16 at 13:44
I'd create an ~/.ssh/config file and add an entry for your server. linux.die.net/man/5/ssh_config
– ryekayo
Nov 14 '16 at 13:44
The key is rejected by the server. Make sure the server is properly configured to accept your key (permissions, SELinux labels).
– Jakuje
Nov 14 '16 at 14:27
The key is rejected by the server. Make sure the server is properly configured to accept your key (permissions, SELinux labels).
– Jakuje
Nov 14 '16 at 14:27
add a comment |
1 Answer
1
active
oldest
votes
Not sure if this will solve this problem 100% but try this out. Create a file in the directory ~/.ssh/config
. When you vim into the config file, you can try the following:
Host <host_name_of_server>
HostName <ip_address_of_server>
User <user_created_for_server>
Port 22
PasswordAuthentication No
IdentityFile <path_to_key>
So once this has been added, you can now do the following:
ssh <host_name_of_server>
When you SSH into the Host that you assigned your server, this will force it not to prompt for a password. Let me know how this pans out.
/Users/lior/.ssh/config: line 1: Bad configuration option: host: /Users/lior/.ssh/config: line 2: Bad configuration option: hostname: /Users/lior/.ssh/config: line 3: Bad configuration option: user: /Users/lior/.ssh/config: line 4: Bad configuration option: port: /Users/lior/.ssh/config: line 5: Bad configuration option: passwordauthentication: /Users/lior/.ssh/config: line 6: Bad configuration option: identityfile:
– Broshi
Nov 21 '16 at 10:03
Yaiks How do i format my code in a comment
– Broshi
Nov 21 '16 at 10:05
I think the:
are not needed
– Spone
May 7 '18 at 15:30
Yeah your right.. ill adjust my answer
– ryekayo
May 7 '18 at 15:31
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f323128%2fssh-password-prompt-for-a-password-after-ssh-keys-are-configured%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
Not sure if this will solve this problem 100% but try this out. Create a file in the directory ~/.ssh/config
. When you vim into the config file, you can try the following:
Host <host_name_of_server>
HostName <ip_address_of_server>
User <user_created_for_server>
Port 22
PasswordAuthentication No
IdentityFile <path_to_key>
So once this has been added, you can now do the following:
ssh <host_name_of_server>
When you SSH into the Host that you assigned your server, this will force it not to prompt for a password. Let me know how this pans out.
/Users/lior/.ssh/config: line 1: Bad configuration option: host: /Users/lior/.ssh/config: line 2: Bad configuration option: hostname: /Users/lior/.ssh/config: line 3: Bad configuration option: user: /Users/lior/.ssh/config: line 4: Bad configuration option: port: /Users/lior/.ssh/config: line 5: Bad configuration option: passwordauthentication: /Users/lior/.ssh/config: line 6: Bad configuration option: identityfile:
– Broshi
Nov 21 '16 at 10:03
Yaiks How do i format my code in a comment
– Broshi
Nov 21 '16 at 10:05
I think the:
are not needed
– Spone
May 7 '18 at 15:30
Yeah your right.. ill adjust my answer
– ryekayo
May 7 '18 at 15:31
add a comment |
Not sure if this will solve this problem 100% but try this out. Create a file in the directory ~/.ssh/config
. When you vim into the config file, you can try the following:
Host <host_name_of_server>
HostName <ip_address_of_server>
User <user_created_for_server>
Port 22
PasswordAuthentication No
IdentityFile <path_to_key>
So once this has been added, you can now do the following:
ssh <host_name_of_server>
When you SSH into the Host that you assigned your server, this will force it not to prompt for a password. Let me know how this pans out.
/Users/lior/.ssh/config: line 1: Bad configuration option: host: /Users/lior/.ssh/config: line 2: Bad configuration option: hostname: /Users/lior/.ssh/config: line 3: Bad configuration option: user: /Users/lior/.ssh/config: line 4: Bad configuration option: port: /Users/lior/.ssh/config: line 5: Bad configuration option: passwordauthentication: /Users/lior/.ssh/config: line 6: Bad configuration option: identityfile:
– Broshi
Nov 21 '16 at 10:03
Yaiks How do i format my code in a comment
– Broshi
Nov 21 '16 at 10:05
I think the:
are not needed
– Spone
May 7 '18 at 15:30
Yeah your right.. ill adjust my answer
– ryekayo
May 7 '18 at 15:31
add a comment |
Not sure if this will solve this problem 100% but try this out. Create a file in the directory ~/.ssh/config
. When you vim into the config file, you can try the following:
Host <host_name_of_server>
HostName <ip_address_of_server>
User <user_created_for_server>
Port 22
PasswordAuthentication No
IdentityFile <path_to_key>
So once this has been added, you can now do the following:
ssh <host_name_of_server>
When you SSH into the Host that you assigned your server, this will force it not to prompt for a password. Let me know how this pans out.
Not sure if this will solve this problem 100% but try this out. Create a file in the directory ~/.ssh/config
. When you vim into the config file, you can try the following:
Host <host_name_of_server>
HostName <ip_address_of_server>
User <user_created_for_server>
Port 22
PasswordAuthentication No
IdentityFile <path_to_key>
So once this has been added, you can now do the following:
ssh <host_name_of_server>
When you SSH into the Host that you assigned your server, this will force it not to prompt for a password. Let me know how this pans out.
edited May 7 '18 at 15:32
answered Nov 14 '16 at 13:52
ryekayoryekayo
2,90592449
2,90592449
/Users/lior/.ssh/config: line 1: Bad configuration option: host: /Users/lior/.ssh/config: line 2: Bad configuration option: hostname: /Users/lior/.ssh/config: line 3: Bad configuration option: user: /Users/lior/.ssh/config: line 4: Bad configuration option: port: /Users/lior/.ssh/config: line 5: Bad configuration option: passwordauthentication: /Users/lior/.ssh/config: line 6: Bad configuration option: identityfile:
– Broshi
Nov 21 '16 at 10:03
Yaiks How do i format my code in a comment
– Broshi
Nov 21 '16 at 10:05
I think the:
are not needed
– Spone
May 7 '18 at 15:30
Yeah your right.. ill adjust my answer
– ryekayo
May 7 '18 at 15:31
add a comment |
/Users/lior/.ssh/config: line 1: Bad configuration option: host: /Users/lior/.ssh/config: line 2: Bad configuration option: hostname: /Users/lior/.ssh/config: line 3: Bad configuration option: user: /Users/lior/.ssh/config: line 4: Bad configuration option: port: /Users/lior/.ssh/config: line 5: Bad configuration option: passwordauthentication: /Users/lior/.ssh/config: line 6: Bad configuration option: identityfile:
– Broshi
Nov 21 '16 at 10:03
Yaiks How do i format my code in a comment
– Broshi
Nov 21 '16 at 10:05
I think the:
are not needed
– Spone
May 7 '18 at 15:30
Yeah your right.. ill adjust my answer
– ryekayo
May 7 '18 at 15:31
/Users/lior/.ssh/config: line 1: Bad configuration option: host: /Users/lior/.ssh/config: line 2: Bad configuration option: hostname: /Users/lior/.ssh/config: line 3: Bad configuration option: user: /Users/lior/.ssh/config: line 4: Bad configuration option: port: /Users/lior/.ssh/config: line 5: Bad configuration option: passwordauthentication: /Users/lior/.ssh/config: line 6: Bad configuration option: identityfile:
– Broshi
Nov 21 '16 at 10:03
/Users/lior/.ssh/config: line 1: Bad configuration option: host: /Users/lior/.ssh/config: line 2: Bad configuration option: hostname: /Users/lior/.ssh/config: line 3: Bad configuration option: user: /Users/lior/.ssh/config: line 4: Bad configuration option: port: /Users/lior/.ssh/config: line 5: Bad configuration option: passwordauthentication: /Users/lior/.ssh/config: line 6: Bad configuration option: identityfile:
– Broshi
Nov 21 '16 at 10:03
Yaiks How do i format my code in a comment
– Broshi
Nov 21 '16 at 10:05
Yaiks How do i format my code in a comment
– Broshi
Nov 21 '16 at 10:05
I think the
:
are not needed– Spone
May 7 '18 at 15:30
I think the
:
are not needed– Spone
May 7 '18 at 15:30
Yeah your right.. ill adjust my answer
– ryekayo
May 7 '18 at 15:31
Yeah your right.. ill adjust my answer
– ryekayo
May 7 '18 at 15:31
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f323128%2fssh-password-prompt-for-a-password-after-ssh-keys-are-configured%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
I'd create an ~/.ssh/config file and add an entry for your server. linux.die.net/man/5/ssh_config
– ryekayo
Nov 14 '16 at 13:44
The key is rejected by the server. Make sure the server is properly configured to accept your key (permissions, SELinux labels).
– Jakuje
Nov 14 '16 at 14:27