How are `/etc/ssh/ssh_known_hosts` and `~/.ssh/known_hosts` used for client authentication?
SSH The Definitive Guide says
OpenSSH maintains a single database serving both server authentication and client
authentication. It is the union of the system’s known_hosts file (/etc/ssh/ssh_known_hosts
), together with the user’s~/.ssh/known_hosts
file on either the source machine
(for server authentication) or the target machine (for client authentication).
According to https://security.stackexchange.com/a/20710/,
I think /etc/ssh/ssh_known_hosts
and ~/.ssh/known_hosts
are for server authentication only, and ~/.ssh/authorized_keys
is for user authentication only.
Does "client authentication" mean the same as "user authentication"?
How are /etc/ssh/ssh_known_hosts
and ~/.ssh/known_hosts
used for client authentication?
Thanks.
ssh
add a comment |
SSH The Definitive Guide says
OpenSSH maintains a single database serving both server authentication and client
authentication. It is the union of the system’s known_hosts file (/etc/ssh/ssh_known_hosts
), together with the user’s~/.ssh/known_hosts
file on either the source machine
(for server authentication) or the target machine (for client authentication).
According to https://security.stackexchange.com/a/20710/,
I think /etc/ssh/ssh_known_hosts
and ~/.ssh/known_hosts
are for server authentication only, and ~/.ssh/authorized_keys
is for user authentication only.
Does "client authentication" mean the same as "user authentication"?
How are /etc/ssh/ssh_known_hosts
and ~/.ssh/known_hosts
used for client authentication?
Thanks.
ssh
If you have the public key of the server you're about to connect to, you can add it to ~/.ssh/known_hosts on the client manually.
– 炸鱼薯条德里克
2 hours ago
That is for server authentication. What is "client authentication" here?
– Tim
2 hours ago
The same, but used by server to directly reject untrusted client host. After passing the client authentication, that client still need to pass user authentication. Used in case like "I don't want anyone but only computers of my company to connect, no matter how much user password or user private key or any type of user credentials they are holding".
– 炸鱼薯条德里克
2 hours ago
Does "client authentication" mean the same as "user authentication"? How are /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts used for client authentication?
– Tim
2 hours ago
add a comment |
SSH The Definitive Guide says
OpenSSH maintains a single database serving both server authentication and client
authentication. It is the union of the system’s known_hosts file (/etc/ssh/ssh_known_hosts
), together with the user’s~/.ssh/known_hosts
file on either the source machine
(for server authentication) or the target machine (for client authentication).
According to https://security.stackexchange.com/a/20710/,
I think /etc/ssh/ssh_known_hosts
and ~/.ssh/known_hosts
are for server authentication only, and ~/.ssh/authorized_keys
is for user authentication only.
Does "client authentication" mean the same as "user authentication"?
How are /etc/ssh/ssh_known_hosts
and ~/.ssh/known_hosts
used for client authentication?
Thanks.
ssh
SSH The Definitive Guide says
OpenSSH maintains a single database serving both server authentication and client
authentication. It is the union of the system’s known_hosts file (/etc/ssh/ssh_known_hosts
), together with the user’s~/.ssh/known_hosts
file on either the source machine
(for server authentication) or the target machine (for client authentication).
According to https://security.stackexchange.com/a/20710/,
I think /etc/ssh/ssh_known_hosts
and ~/.ssh/known_hosts
are for server authentication only, and ~/.ssh/authorized_keys
is for user authentication only.
Does "client authentication" mean the same as "user authentication"?
How are /etc/ssh/ssh_known_hosts
and ~/.ssh/known_hosts
used for client authentication?
Thanks.
ssh
ssh
asked 3 hours ago
TimTim
27.6k78264480
27.6k78264480
If you have the public key of the server you're about to connect to, you can add it to ~/.ssh/known_hosts on the client manually.
– 炸鱼薯条德里克
2 hours ago
That is for server authentication. What is "client authentication" here?
– Tim
2 hours ago
The same, but used by server to directly reject untrusted client host. After passing the client authentication, that client still need to pass user authentication. Used in case like "I don't want anyone but only computers of my company to connect, no matter how much user password or user private key or any type of user credentials they are holding".
– 炸鱼薯条德里克
2 hours ago
Does "client authentication" mean the same as "user authentication"? How are /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts used for client authentication?
– Tim
2 hours ago
add a comment |
If you have the public key of the server you're about to connect to, you can add it to ~/.ssh/known_hosts on the client manually.
– 炸鱼薯条德里克
2 hours ago
That is for server authentication. What is "client authentication" here?
– Tim
2 hours ago
The same, but used by server to directly reject untrusted client host. After passing the client authentication, that client still need to pass user authentication. Used in case like "I don't want anyone but only computers of my company to connect, no matter how much user password or user private key or any type of user credentials they are holding".
– 炸鱼薯条德里克
2 hours ago
Does "client authentication" mean the same as "user authentication"? How are /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts used for client authentication?
– Tim
2 hours ago
If you have the public key of the server you're about to connect to, you can add it to ~/.ssh/known_hosts on the client manually.
– 炸鱼薯条德里克
2 hours ago
If you have the public key of the server you're about to connect to, you can add it to ~/.ssh/known_hosts on the client manually.
– 炸鱼薯条德里克
2 hours ago
That is for server authentication. What is "client authentication" here?
– Tim
2 hours ago
That is for server authentication. What is "client authentication" here?
– Tim
2 hours ago
The same, but used by server to directly reject untrusted client host. After passing the client authentication, that client still need to pass user authentication. Used in case like "I don't want anyone but only computers of my company to connect, no matter how much user password or user private key or any type of user credentials they are holding".
– 炸鱼薯条德里克
2 hours ago
The same, but used by server to directly reject untrusted client host. After passing the client authentication, that client still need to pass user authentication. Used in case like "I don't want anyone but only computers of my company to connect, no matter how much user password or user private key or any type of user credentials they are holding".
– 炸鱼薯条德里克
2 hours ago
Does "client authentication" mean the same as "user authentication"? How are /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts used for client authentication?
– Tim
2 hours ago
Does "client authentication" mean the same as "user authentication"? How are /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts used for client authentication?
– Tim
2 hours ago
add a comment |
0
active
oldest
votes
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%2f505769%2fhow-are-etc-ssh-ssh-known-hosts-and-ssh-known-hosts-used-for-client-auth%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f505769%2fhow-are-etc-ssh-ssh-known-hosts-and-ssh-known-hosts-used-for-client-auth%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
If you have the public key of the server you're about to connect to, you can add it to ~/.ssh/known_hosts on the client manually.
– 炸鱼薯条德里克
2 hours ago
That is for server authentication. What is "client authentication" here?
– Tim
2 hours ago
The same, but used by server to directly reject untrusted client host. After passing the client authentication, that client still need to pass user authentication. Used in case like "I don't want anyone but only computers of my company to connect, no matter how much user password or user private key or any type of user credentials they are holding".
– 炸鱼薯条德里克
2 hours ago
Does "client authentication" mean the same as "user authentication"? How are /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts used for client authentication?
– Tim
2 hours ago