SSH-keys ipv4 ipv6 connection issue2019 Community Moderator ElectionSSH login via IPv6 successfull while using IPv4 to the same host yields “Permission denied”Why is my ssh connection unauthorized although I have updated my key on the remote machine?How do I stop ssh-agent trying all keys with agent forwarding?SSH Remote Execution - checking server can do it?Proper way to set up rsnapshot over sshSSH Configuration Help / Can't tunnelSSH Keyfile works for all users except oneGnuPG 2.1.20 ssh agent forwarding with yubikey on OSX failsGit asks for password when using SSH URL, ssh does notpasswordless ssh to localhost in Ubuntu 16.04Have unexpected hostname and IP
Can a Bard use an arcane focus?
Is there a good way to store credentials outside of a password manager?
Reply ‘no position’ while the job posting is still there (‘HiWi’ position in Germany)
A social experiment. What is the worst that can happen?
Can a Gentile theist be saved?
I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?
Why is delta-v is the most useful quantity for planning space travel?
Is there a problem with hiding "forgot password" until it's needed?
Would it be legal for a US State to ban exports of a natural resource?
Pronouncing Homer as in modern Greek
How to prevent YouTube from showing already watched videos?
Blender - show edges angles “direction”
Greatest common substring
Can I rely on these GitHub repository files?
How do ultrasonic sensors differentiate between transmitted and received signals?
How can I successfully establish a nationwide combat training program for a large country?
How to deal with or prevent idle in the test team?
What if somebody invests in my application?
Organic chemistry Iodoform Reaction
Installing PowerShell on 32-bit Kali OS fails
Perfect riffle shuffles
Bob has never been a M before
Is there any significance to the Valyrian Stone vault door of Qarth?
Is the next prime number always the next number divisible by the current prime number, except for any numbers previously divisible by primes?
SSH-keys ipv4 ipv6 connection issue
2019 Community Moderator ElectionSSH login via IPv6 successfull while using IPv4 to the same host yields “Permission denied”Why is my ssh connection unauthorized although I have updated my key on the remote machine?How do I stop ssh-agent trying all keys with agent forwarding?SSH Remote Execution - checking server can do it?Proper way to set up rsnapshot over sshSSH Configuration Help / Can't tunnelSSH Keyfile works for all users except oneGnuPG 2.1.20 ssh agent forwarding with yubikey on OSX failsGit asks for password when using SSH URL, ssh does notpasswordless ssh to localhost in Ubuntu 16.04Have unexpected hostname and IP
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
|
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
10.0.0.231:2222is not a valid destination. Use eitherssh -p 2222 j@10.0.0.231orssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?
– tastytea
yesterday
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
yesterday
Would you update your question with the output ofssh -v server, please?
– tastytea
yesterday
1
I meantssh -v <IP/hostname of your server>, not the string "server".
– tastytea
yesterday
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
yesterday
|
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 22 hours ago
volare
New contributor
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked yesterday
volarevolare
61
61
New contributor
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
10.0.0.231:2222is not a valid destination. Use eitherssh -p 2222 j@10.0.0.231orssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?
– tastytea
yesterday
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
yesterday
Would you update your question with the output ofssh -v server, please?
– tastytea
yesterday
1
I meantssh -v <IP/hostname of your server>, not the string "server".
– tastytea
yesterday
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
yesterday
|
show 3 more comments
10.0.0.231:2222is not a valid destination. Use eitherssh -p 2222 j@10.0.0.231orssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?
– tastytea
yesterday
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
yesterday
Would you update your question with the output ofssh -v server, please?
– tastytea
yesterday
1
I meantssh -v <IP/hostname of your server>, not the string "server".
– tastytea
yesterday
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
yesterday
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
yesterday
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
yesterday
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
yesterday
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
yesterday
Would you update your question with the output of
ssh -v server, please?– tastytea
yesterday
Would you update your question with the output of
ssh -v server, please?– tastytea
yesterday
1
1
I meant
ssh -v <IP/hostname of your server>, not the string "server".– tastytea
yesterday
I meant
ssh -v <IP/hostname of your server>, not the string "server".– tastytea
yesterday
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
yesterday
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
yesterday
|
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
yesterday
@JacobBruck Thesshclient 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
yesterday
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
yesterday
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
yesterday
@JacobBruck Thesshclient 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
yesterday
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
yesterday
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
yesterday
@JacobBruck Thesshclient 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
yesterday
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
yesterday
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 yesterday
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
yesterday
@JacobBruck Thesshclient 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
yesterday
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
yesterday
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
yesterday
@JacobBruck Thesshclient 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
yesterday
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
yesterday
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
yesterday
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
yesterday
@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
yesterday
@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
yesterday
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
yesterday
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
yesterday
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered yesterday
volarevolare
61
61
New contributor
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
volare is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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:2222is not a valid destination. Use eitherssh -p 2222 j@10.0.0.231orssh ssh://j@10.0.0.231:2222. What do you mean by "I can ssh when it resolves through https hostnames"?– tastytea
yesterday
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
yesterday
Would you update your question with the output of
ssh -v server, please?– tastytea
yesterday
1
I meant
ssh -v <IP/hostname of your server>, not the string "server".– tastytea
yesterday
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
yesterday