Changing the order of private keys passed via ssh login
Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
A server was set to accept three login attempts. The ssh
system is checking three identity files before choosing the correct one.
The ssh command is as follows:
ssh -i ~/.ssh/username username@xx.xx.xx.xxx -v
The three identity files are as follows:
debug2: key: /path/to/.ssh/identity1
debug2: key: /path/to/.ssh/identity2
debug2: key: /path/to/.ssh/identity3
debug2: key: /path/to/.ssh/username
How can I remove the three incorrect identity files? I have already tried deleting them from the directory, also I tried updating ~/.ssh/config
as follows:
Host xx.xx.xx.xxx
User username
IdentityFile ~/.ssh/username
How can I get have ssh
to use the correct identity file?
linux ssh security
add a comment |Â
up vote
6
down vote
favorite
A server was set to accept three login attempts. The ssh
system is checking three identity files before choosing the correct one.
The ssh command is as follows:
ssh -i ~/.ssh/username username@xx.xx.xx.xxx -v
The three identity files are as follows:
debug2: key: /path/to/.ssh/identity1
debug2: key: /path/to/.ssh/identity2
debug2: key: /path/to/.ssh/identity3
debug2: key: /path/to/.ssh/username
How can I remove the three incorrect identity files? I have already tried deleting them from the directory, also I tried updating ~/.ssh/config
as follows:
Host xx.xx.xx.xxx
User username
IdentityFile ~/.ssh/username
How can I get have ssh
to use the correct identity file?
linux ssh security
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
A server was set to accept three login attempts. The ssh
system is checking three identity files before choosing the correct one.
The ssh command is as follows:
ssh -i ~/.ssh/username username@xx.xx.xx.xxx -v
The three identity files are as follows:
debug2: key: /path/to/.ssh/identity1
debug2: key: /path/to/.ssh/identity2
debug2: key: /path/to/.ssh/identity3
debug2: key: /path/to/.ssh/username
How can I remove the three incorrect identity files? I have already tried deleting them from the directory, also I tried updating ~/.ssh/config
as follows:
Host xx.xx.xx.xxx
User username
IdentityFile ~/.ssh/username
How can I get have ssh
to use the correct identity file?
linux ssh security
A server was set to accept three login attempts. The ssh
system is checking three identity files before choosing the correct one.
The ssh command is as follows:
ssh -i ~/.ssh/username username@xx.xx.xx.xxx -v
The three identity files are as follows:
debug2: key: /path/to/.ssh/identity1
debug2: key: /path/to/.ssh/identity2
debug2: key: /path/to/.ssh/identity3
debug2: key: /path/to/.ssh/username
How can I remove the three incorrect identity files? I have already tried deleting them from the directory, also I tried updating ~/.ssh/config
as follows:
Host xx.xx.xx.xxx
User username
IdentityFile ~/.ssh/username
How can I get have ssh
to use the correct identity file?
linux ssh security
linux ssh security
edited Sep 13 at 19:31
Goro
5,47052460
5,47052460
asked Feb 21 '13 at 2:16
csi
193210
193210
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
See if the identity file is listed
ssh-add -l
If not, add it
ssh-add ~/.ssh/username
Was then able to select the proper identity file
1
Was the reason for the problem that the other identities had been loaded by ssh-agent?
â Hauke Laging
Feb 21 '13 at 2:31
@HaukeLaging if so, this is a piece of information that should be included in the question; ie., that an agent is running...
â jasonwryan
Feb 21 '13 at 2:37
Yes, the other identities were previously loaded. @jasonwryan, would have included in the question had I known.
â csi
Feb 21 '13 at 15:00
@ChristopherIckes It is a wiki: you can edit your question and include other relevant information...
â jasonwryan
Feb 21 '13 at 17:24
add a comment |Â
up vote
3
down vote
It looks like ssh is trying all the identities it knows about. If you want to only try the identity specified in the config file, add the line
IdentitiesOnly = yes
to that Host section of your .ssh/config file.
Here's the relevant section of the ssh_config man page:
IdentitiesOnly
Specifies that ssh(1) should only use the authentication identity files configured in the ssh_config files, even if ssh-agent(1) offers more identities. The argument to this keyword must be ''yes'' or ''no''. This option is intended for situations where ssh-agent offers many different identities. The default is ''no''.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
See if the identity file is listed
ssh-add -l
If not, add it
ssh-add ~/.ssh/username
Was then able to select the proper identity file
1
Was the reason for the problem that the other identities had been loaded by ssh-agent?
â Hauke Laging
Feb 21 '13 at 2:31
@HaukeLaging if so, this is a piece of information that should be included in the question; ie., that an agent is running...
â jasonwryan
Feb 21 '13 at 2:37
Yes, the other identities were previously loaded. @jasonwryan, would have included in the question had I known.
â csi
Feb 21 '13 at 15:00
@ChristopherIckes It is a wiki: you can edit your question and include other relevant information...
â jasonwryan
Feb 21 '13 at 17:24
add a comment |Â
up vote
3
down vote
accepted
See if the identity file is listed
ssh-add -l
If not, add it
ssh-add ~/.ssh/username
Was then able to select the proper identity file
1
Was the reason for the problem that the other identities had been loaded by ssh-agent?
â Hauke Laging
Feb 21 '13 at 2:31
@HaukeLaging if so, this is a piece of information that should be included in the question; ie., that an agent is running...
â jasonwryan
Feb 21 '13 at 2:37
Yes, the other identities were previously loaded. @jasonwryan, would have included in the question had I known.
â csi
Feb 21 '13 at 15:00
@ChristopherIckes It is a wiki: you can edit your question and include other relevant information...
â jasonwryan
Feb 21 '13 at 17:24
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
See if the identity file is listed
ssh-add -l
If not, add it
ssh-add ~/.ssh/username
Was then able to select the proper identity file
See if the identity file is listed
ssh-add -l
If not, add it
ssh-add ~/.ssh/username
Was then able to select the proper identity file
answered Feb 21 '13 at 2:27
csi
193210
193210
1
Was the reason for the problem that the other identities had been loaded by ssh-agent?
â Hauke Laging
Feb 21 '13 at 2:31
@HaukeLaging if so, this is a piece of information that should be included in the question; ie., that an agent is running...
â jasonwryan
Feb 21 '13 at 2:37
Yes, the other identities were previously loaded. @jasonwryan, would have included in the question had I known.
â csi
Feb 21 '13 at 15:00
@ChristopherIckes It is a wiki: you can edit your question and include other relevant information...
â jasonwryan
Feb 21 '13 at 17:24
add a comment |Â
1
Was the reason for the problem that the other identities had been loaded by ssh-agent?
â Hauke Laging
Feb 21 '13 at 2:31
@HaukeLaging if so, this is a piece of information that should be included in the question; ie., that an agent is running...
â jasonwryan
Feb 21 '13 at 2:37
Yes, the other identities were previously loaded. @jasonwryan, would have included in the question had I known.
â csi
Feb 21 '13 at 15:00
@ChristopherIckes It is a wiki: you can edit your question and include other relevant information...
â jasonwryan
Feb 21 '13 at 17:24
1
1
Was the reason for the problem that the other identities had been loaded by ssh-agent?
â Hauke Laging
Feb 21 '13 at 2:31
Was the reason for the problem that the other identities had been loaded by ssh-agent?
â Hauke Laging
Feb 21 '13 at 2:31
@HaukeLaging if so, this is a piece of information that should be included in the question; ie., that an agent is running...
â jasonwryan
Feb 21 '13 at 2:37
@HaukeLaging if so, this is a piece of information that should be included in the question; ie., that an agent is running...
â jasonwryan
Feb 21 '13 at 2:37
Yes, the other identities were previously loaded. @jasonwryan, would have included in the question had I known.
â csi
Feb 21 '13 at 15:00
Yes, the other identities were previously loaded. @jasonwryan, would have included in the question had I known.
â csi
Feb 21 '13 at 15:00
@ChristopherIckes It is a wiki: you can edit your question and include other relevant information...
â jasonwryan
Feb 21 '13 at 17:24
@ChristopherIckes It is a wiki: you can edit your question and include other relevant information...
â jasonwryan
Feb 21 '13 at 17:24
add a comment |Â
up vote
3
down vote
It looks like ssh is trying all the identities it knows about. If you want to only try the identity specified in the config file, add the line
IdentitiesOnly = yes
to that Host section of your .ssh/config file.
Here's the relevant section of the ssh_config man page:
IdentitiesOnly
Specifies that ssh(1) should only use the authentication identity files configured in the ssh_config files, even if ssh-agent(1) offers more identities. The argument to this keyword must be ''yes'' or ''no''. This option is intended for situations where ssh-agent offers many different identities. The default is ''no''.
add a comment |Â
up vote
3
down vote
It looks like ssh is trying all the identities it knows about. If you want to only try the identity specified in the config file, add the line
IdentitiesOnly = yes
to that Host section of your .ssh/config file.
Here's the relevant section of the ssh_config man page:
IdentitiesOnly
Specifies that ssh(1) should only use the authentication identity files configured in the ssh_config files, even if ssh-agent(1) offers more identities. The argument to this keyword must be ''yes'' or ''no''. This option is intended for situations where ssh-agent offers many different identities. The default is ''no''.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
It looks like ssh is trying all the identities it knows about. If you want to only try the identity specified in the config file, add the line
IdentitiesOnly = yes
to that Host section of your .ssh/config file.
Here's the relevant section of the ssh_config man page:
IdentitiesOnly
Specifies that ssh(1) should only use the authentication identity files configured in the ssh_config files, even if ssh-agent(1) offers more identities. The argument to this keyword must be ''yes'' or ''no''. This option is intended for situations where ssh-agent offers many different identities. The default is ''no''.
It looks like ssh is trying all the identities it knows about. If you want to only try the identity specified in the config file, add the line
IdentitiesOnly = yes
to that Host section of your .ssh/config file.
Here's the relevant section of the ssh_config man page:
IdentitiesOnly
Specifies that ssh(1) should only use the authentication identity files configured in the ssh_config files, even if ssh-agent(1) offers more identities. The argument to this keyword must be ''yes'' or ''no''. This option is intended for situations where ssh-agent offers many different identities. The default is ''no''.
answered Sep 13 at 17:30
Brian Minton
268211
268211
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f65563%2fchanging-the-order-of-private-keys-passed-via-ssh-login%23new-answer', 'question_page');
);
Post as a guest
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
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
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