Does ssh-add honor the declarations made in ssh_config file(s)?Multiple 'Host *' in ssh_config?ssh-agent:...
Random point on a sphere
Converting multiple assignment statements to single comma separated assignment
Is it appropriate for a professor to require students to sign a non-disclosure agreement before being taught?
Can the UK veto its own extension request?
Can I disable a battery powered device by reversing half of its batteries?
Can I cast Sunbeam if both my hands are busy?
Is there a standard terminology for female equivalents of terms such as 'Kingdom' and if so, what are the most common terms?
How to read torque specs off this Nissan service diagram?
A medieval fantasy adventurer lights a torch in a 100% pure oxygen room. What happens?
Why is the T-1000 humanoid?
Why are some Mac apps not available on AppStore?
How do email clients "send later" without storing a password?
Double it your way
Gas pipes - why does gas burn "outwards?"
Are the definite and indefinite integrals actually two different things? Where is the flaw in my understanding?
Why do sellers care about down payments?
Exact Brexit date and consequences
Do all humans have an identical nucleotide sequence for certain proteins, e.g haemoglobin?
Sol Ⅲ = Earth: What is the origin of this planetary naming scheme?
What's the biggest organic molecule that could have a smell?
Using the pipe operator ("|") when executing system commands
Do ibuprofen or paracetamol cause hearing loss?
Kingdom Map and Travel Pace
SCOTUS - Can Congress overrule Marbury v. Madison by statute?
Does ssh-add honor the declarations made in ssh_config file(s)?
Multiple 'Host *' in ssh_config?ssh-agent: don't forward authentication for the whole keyringSSH Agent does not work with pkcs8 private keyWhy do I need to insert the passphrase for an RSA key on a remote host after SSH?How do I stop ssh-agent trying all keys with agent forwarding?“Permanently added the RSA host key” what does it mean?constant “enter passphrase for public key” by sshHow to use ssh-agent for offering host specific keys from ~/.ssh/config file and manage the passphrases?ssh_config Host * overrides earlier hostHow does ssh-copy-id get the public key when only the private key is loaded?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
Background
I use a 4096-bit RSA key-pair for authorizing access to my server. By ssh_config
files I am referring to ~/.ssh/config
and /etc/ssh/ssh_config
.
Here's what my ~/.ssh/config
looks like:
Host gg-root
HostName 172.47.95.122
Host ss-root
HostName 172.47.95.123
# Common for my servers
Host ds-root tm-root
User root
Port 32001
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa_bull
# Common for all
Host *
AddKeysToAgent yes
Now, I can simply connect to my server via SSH with the following (without any further configuration):
ssh gg-root
ssh ss-root
Thing is, I need to add the private key ~/.ssh/id_rsa_bull
to the system's SSH agent to make it easily available to other apps like FileZilla which I use for SFTP. (Esp. because I don't like that FileZilla needs an unencrypted private key as .ppk
.)
So, I either run this command each time:
ssh-add ~/.ssh/id_rsa_pepper
Or have this in my ~/.profile
:
ssh-add ~/.ssh/id_rsa_pepper > /dev/null 2>&1
Question
When I add the key to the system's SSH agent using ssh-add
, does it honor the declarations I've made in ssh_config
file(s)? Specifically, does it make sure that ~/.ssh/id_rsa_pepper
is only used for 172.47.95.{122,123}
?
Based on how I interpreted what I read, I believe it should. If I am wrong, please enlighten me as to how I should go about adding a private key to the system's SSH agent where the said private key is only used for stated hosts?
ssh openssh key-authentication ssh-agent ssh-config
add a comment |
Background
I use a 4096-bit RSA key-pair for authorizing access to my server. By ssh_config
files I am referring to ~/.ssh/config
and /etc/ssh/ssh_config
.
Here's what my ~/.ssh/config
looks like:
Host gg-root
HostName 172.47.95.122
Host ss-root
HostName 172.47.95.123
# Common for my servers
Host ds-root tm-root
User root
Port 32001
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa_bull
# Common for all
Host *
AddKeysToAgent yes
Now, I can simply connect to my server via SSH with the following (without any further configuration):
ssh gg-root
ssh ss-root
Thing is, I need to add the private key ~/.ssh/id_rsa_bull
to the system's SSH agent to make it easily available to other apps like FileZilla which I use for SFTP. (Esp. because I don't like that FileZilla needs an unencrypted private key as .ppk
.)
So, I either run this command each time:
ssh-add ~/.ssh/id_rsa_pepper
Or have this in my ~/.profile
:
ssh-add ~/.ssh/id_rsa_pepper > /dev/null 2>&1
Question
When I add the key to the system's SSH agent using ssh-add
, does it honor the declarations I've made in ssh_config
file(s)? Specifically, does it make sure that ~/.ssh/id_rsa_pepper
is only used for 172.47.95.{122,123}
?
Based on how I interpreted what I read, I believe it should. If I am wrong, please enlighten me as to how I should go about adding a private key to the system's SSH agent where the said private key is only used for stated hosts?
ssh openssh key-authentication ssh-agent ssh-config
add a comment |
Background
I use a 4096-bit RSA key-pair for authorizing access to my server. By ssh_config
files I am referring to ~/.ssh/config
and /etc/ssh/ssh_config
.
Here's what my ~/.ssh/config
looks like:
Host gg-root
HostName 172.47.95.122
Host ss-root
HostName 172.47.95.123
# Common for my servers
Host ds-root tm-root
User root
Port 32001
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa_bull
# Common for all
Host *
AddKeysToAgent yes
Now, I can simply connect to my server via SSH with the following (without any further configuration):
ssh gg-root
ssh ss-root
Thing is, I need to add the private key ~/.ssh/id_rsa_bull
to the system's SSH agent to make it easily available to other apps like FileZilla which I use for SFTP. (Esp. because I don't like that FileZilla needs an unencrypted private key as .ppk
.)
So, I either run this command each time:
ssh-add ~/.ssh/id_rsa_pepper
Or have this in my ~/.profile
:
ssh-add ~/.ssh/id_rsa_pepper > /dev/null 2>&1
Question
When I add the key to the system's SSH agent using ssh-add
, does it honor the declarations I've made in ssh_config
file(s)? Specifically, does it make sure that ~/.ssh/id_rsa_pepper
is only used for 172.47.95.{122,123}
?
Based on how I interpreted what I read, I believe it should. If I am wrong, please enlighten me as to how I should go about adding a private key to the system's SSH agent where the said private key is only used for stated hosts?
ssh openssh key-authentication ssh-agent ssh-config
Background
I use a 4096-bit RSA key-pair for authorizing access to my server. By ssh_config
files I am referring to ~/.ssh/config
and /etc/ssh/ssh_config
.
Here's what my ~/.ssh/config
looks like:
Host gg-root
HostName 172.47.95.122
Host ss-root
HostName 172.47.95.123
# Common for my servers
Host ds-root tm-root
User root
Port 32001
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa_bull
# Common for all
Host *
AddKeysToAgent yes
Now, I can simply connect to my server via SSH with the following (without any further configuration):
ssh gg-root
ssh ss-root
Thing is, I need to add the private key ~/.ssh/id_rsa_bull
to the system's SSH agent to make it easily available to other apps like FileZilla which I use for SFTP. (Esp. because I don't like that FileZilla needs an unencrypted private key as .ppk
.)
So, I either run this command each time:
ssh-add ~/.ssh/id_rsa_pepper
Or have this in my ~/.profile
:
ssh-add ~/.ssh/id_rsa_pepper > /dev/null 2>&1
Question
When I add the key to the system's SSH agent using ssh-add
, does it honor the declarations I've made in ssh_config
file(s)? Specifically, does it make sure that ~/.ssh/id_rsa_pepper
is only used for 172.47.95.{122,123}
?
Based on how I interpreted what I read, I believe it should. If I am wrong, please enlighten me as to how I should go about adding a private key to the system's SSH agent where the said private key is only used for stated hosts?
ssh openssh key-authentication ssh-agent ssh-config
ssh openssh key-authentication ssh-agent ssh-config
asked 53 mins ago
its_meits_me
5,75318 gold badges47 silver badges49 bronze badges
5,75318 gold badges47 silver badges49 bronze badges
add a comment |
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/4.0/"u003ecc by-sa 4.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%2f541103%2fdoes-ssh-add-honor-the-declarations-made-in-ssh-config-files%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%2f541103%2fdoes-ssh-add-honor-the-declarations-made-in-ssh-config-files%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