SSH-keys ipv4 ipv6 connection issue
Update: I found this question which seems to be very related. Not sure how exactly.
What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like encryption keys aren't working, but I am using keys that I know have worked in the past.
ssh -v server
OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 39: Applying options for server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.
my config
Host server
User user
HostName x.x.x.x
IdentityFile ~/.ssh/id_key
I don't recall ever changing my /etc/ssh/ssh_config and my firewall is set to allow ssh.
ssh dns host-name-resolution
New contributor
|
show 3 more comments
Update: I found this question which seems to be very related. Not sure how exactly.
What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like encryption keys aren't working, but I am using keys that I know have worked in the past.
ssh -v server
OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 39: Applying options for server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.
my config
Host server
User user
HostName x.x.x.x
IdentityFile ~/.ssh/id_key
I don't recall ever changing my /etc/ssh/ssh_config and my firewall is set to allow ssh.
ssh dns host-name-resolution
New contributor
10.0.0.231:2222
is not a valid destination. Use eitherssh -p 2222 j@10.0.0.231
orssh ssh://j@10.0.0.231:2222
. What do you mean by "I can ssh when it resolves through https hostnames"?
– tastytea
11 hours ago
oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames
– volare
11 hours ago
Would you update your question with the output ofssh -v server
, please?
– tastytea
11 hours ago
1
I meantssh -v <IP/hostname of your server>
, not the string "server".
– tastytea
11 hours ago
I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?
– volare
10 hours ago
|
show 3 more comments
Update: I found this question which seems to be very related. Not sure how exactly.
What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like encryption keys aren't working, but I am using keys that I know have worked in the past.
ssh -v server
OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 39: Applying options for server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.
my config
Host server
User user
HostName x.x.x.x
IdentityFile ~/.ssh/id_key
I don't recall ever changing my /etc/ssh/ssh_config and my firewall is set to allow ssh.
ssh dns host-name-resolution
New contributor
Update: I found this question which seems to be very related. Not sure how exactly.
What am I missing? I can only use ssh when it resolves through https hostnames? Normal ssh it hangs kinda like encryption keys aren't working, but I am using keys that I know have worked in the past.
ssh -v server
OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/user/.ssh/config
debug1: /home/user/.ssh/config line 39: Applying options for server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.
my config
Host server
User user
HostName x.x.x.x
IdentityFile ~/.ssh/id_key
I don't recall ever changing my /etc/ssh/ssh_config and my firewall is set to allow ssh.
ssh dns host-name-resolution
ssh dns host-name-resolution
New contributor
New contributor
edited 24 mins ago
volare
New contributor
asked 11 hours ago
volarevolare
61
61
New contributor
New contributor
10.0.0.231:2222
is not a valid destination. Use eitherssh -p 2222 j@10.0.0.231
orssh ssh://j@10.0.0.231:2222
. What do you mean by "I can ssh when it resolves through https hostnames"?
– tastytea
11 hours ago
oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames
– volare
11 hours ago
Would you update your question with the output ofssh -v server
, please?
– tastytea
11 hours ago
1
I meantssh -v <IP/hostname of your server>
, not the string "server".
– tastytea
11 hours ago
I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?
– volare
10 hours ago
|
show 3 more comments
10.0.0.231:2222
is not a valid destination. Use eitherssh -p 2222 j@10.0.0.231
orssh ssh://j@10.0.0.231:2222
. What do you mean by "I can ssh when it resolves through https hostnames"?
– tastytea
11 hours ago
oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames
– volare
11 hours ago
Would you update your question with the output ofssh -v server
, please?
– tastytea
11 hours ago
1
I meantssh -v <IP/hostname of your server>
, not the string "server".
– tastytea
11 hours ago
I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?
– volare
10 hours ago
10.0.0.231:2222
is not a valid destination. Use either ssh -p 2222 j@10.0.0.231
or ssh ssh://j@10.0.0.231:2222
. What do you mean by "I can ssh when it resolves through https hostnames"?– tastytea
11 hours ago
10.0.0.231:2222
is not a valid destination. Use either ssh -p 2222 j@10.0.0.231
or ssh ssh://j@10.0.0.231:2222
. What do you mean by "I can ssh when it resolves through https hostnames"?– tastytea
11 hours ago
oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames
– volare
11 hours ago
oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames
– volare
11 hours ago
Would you update your question with the output of
ssh -v server
, please?– tastytea
11 hours ago
Would you update your question with the output of
ssh -v server
, please?– tastytea
11 hours ago
1
1
I meant
ssh -v <IP/hostname of your server>
, not the string "server".– tastytea
11 hours ago
I meant
ssh -v <IP/hostname of your server>
, not the string "server".– tastytea
11 hours ago
I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?
– volare
10 hours ago
I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?
– volare
10 hours ago
|
show 3 more comments
2 Answers
2
active
oldest
votes
If you want to connect to a particular port on the remote system with ssh
, you should be using the -p
option:
ssh -p 2222 j@10.0.0.231
When the target address does not look like an IP number, which it does not do if you add :2222
to the end of it, ssh
will try to resolve the whole string 10.0.0.231:2222
as a hostname using DNS.
If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config
file and add
Host thehost
User j
HostName 10.0.0.231
Port 2222
and then use
ssh thehost
Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.
– volare
11 hours ago
@JacobBruck Thessh
client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?
– Kusalananda
11 hours ago
Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..
– volare
11 hours ago
add a comment |
This isn't the full answer, but my encryption keys work with ipv6.
so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys
So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?
New contributor
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
});
}
});
volare is a new contributor. Be nice, and check out our Code of Conduct.
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%2f508321%2fssh-keys-ipv4-ipv6-connection-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you want to connect to a particular port on the remote system with ssh
, you should be using the -p
option:
ssh -p 2222 j@10.0.0.231
When the target address does not look like an IP number, which it does not do if you add :2222
to the end of it, ssh
will try to resolve the whole string 10.0.0.231:2222
as a hostname using DNS.
If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config
file and add
Host thehost
User j
HostName 10.0.0.231
Port 2222
and then use
ssh thehost
Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.
– volare
11 hours ago
@JacobBruck Thessh
client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?
– Kusalananda
11 hours ago
Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..
– volare
11 hours ago
add a comment |
If you want to connect to a particular port on the remote system with ssh
, you should be using the -p
option:
ssh -p 2222 j@10.0.0.231
When the target address does not look like an IP number, which it does not do if you add :2222
to the end of it, ssh
will try to resolve the whole string 10.0.0.231:2222
as a hostname using DNS.
If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config
file and add
Host thehost
User j
HostName 10.0.0.231
Port 2222
and then use
ssh thehost
Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.
– volare
11 hours ago
@JacobBruck Thessh
client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?
– Kusalananda
11 hours ago
Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..
– volare
11 hours ago
add a comment |
If you want to connect to a particular port on the remote system with ssh
, you should be using the -p
option:
ssh -p 2222 j@10.0.0.231
When the target address does not look like an IP number, which it does not do if you add :2222
to the end of it, ssh
will try to resolve the whole string 10.0.0.231:2222
as a hostname using DNS.
If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config
file and add
Host thehost
User j
HostName 10.0.0.231
Port 2222
and then use
ssh thehost
If you want to connect to a particular port on the remote system with ssh
, you should be using the -p
option:
ssh -p 2222 j@10.0.0.231
When the target address does not look like an IP number, which it does not do if you add :2222
to the end of it, ssh
will try to resolve the whole string 10.0.0.231:2222
as a hostname using DNS.
If you find yourself connecting to this host on this port often, you may want to set up a configuration for it to make it easier. Edit (or create) your ~/.ssh/config
file and add
Host thehost
User j
HostName 10.0.0.231
Port 2222
and then use
ssh thehost
answered 11 hours ago
KusalanandaKusalananda
137k17258426
137k17258426
Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.
– volare
11 hours ago
@JacobBruck Thessh
client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?
– Kusalananda
11 hours ago
Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..
– volare
11 hours ago
add a comment |
Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.
– volare
11 hours ago
@JacobBruck Thessh
client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?
– Kusalananda
11 hours ago
Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..
– volare
11 hours ago
Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.
– volare
11 hours ago
Sorry that part is irrelevant. I thought I erased it. I've been able to access that in the past without issue and it isn't really the problem im tryin to solve.
– volare
11 hours ago
@JacobBruck The
ssh
client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?– Kusalananda
11 hours ago
@JacobBruck The
ssh
client may say "connection timed out" when you use it with an IP address, but it would not say "could not resolve hostname" since you're not giving it a hostname. Could you please re-run your test and insert the proper error message in the question?– Kusalananda
11 hours ago
Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..
– volare
11 hours ago
Yep I'm looking back at what is going on here. That solution does work, which tells me my test was flawed from the start..so I'm back to square one..
– volare
11 hours ago
add a comment |
This isn't the full answer, but my encryption keys work with ipv6.
so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys
So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?
New contributor
add a comment |
This isn't the full answer, but my encryption keys work with ipv6.
so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys
So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?
New contributor
add a comment |
This isn't the full answer, but my encryption keys work with ipv6.
so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys
So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?
New contributor
This isn't the full answer, but my encryption keys work with ipv6.
so two possibble answers. I'm dumb and got ssh keys mixed up a billion times a long with my ip addresses, (very likely), but I still can't connect when I try an ipv4 address with encryption keys
So I did something to make ssh only allow encryption keys with ipv6? I don't know if that is even a thing, or how or why. And why would ipv4 work without encryption?
New contributor
New contributor
answered 9 hours ago
volarevolare
61
61
New contributor
New contributor
add a comment |
add a comment |
volare is a new contributor. Be nice, and check out our Code of Conduct.
volare is a new contributor. Be nice, and check out our Code of Conduct.
volare is a new contributor. Be nice, and check out our Code of Conduct.
volare is a new contributor. Be nice, and check out our Code of Conduct.
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%2f508321%2fssh-keys-ipv4-ipv6-connection-issue%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
10.0.0.231:2222
is not a valid destination. Use eitherssh -p 2222 j@10.0.0.231
orssh ssh://j@10.0.0.231:2222
. What do you mean by "I can ssh when it resolves through https hostnames"?– tastytea
11 hours ago
oh yeah i thought I took that out, thats just aspecific port for that box.....I have servers with ssl certificates specific ssh-keys and I can ssh to their hostnames
– volare
11 hours ago
Would you update your question with the output of
ssh -v server
, please?– tastytea
11 hours ago
1
I meant
ssh -v <IP/hostname of your server>
, not the string "server".– tastytea
11 hours ago
I updated the question with info from the bad connection, it hangs after it reads the configuration file. do you want output from the working connection? how much should I post?
– volare
10 hours ago