ssh: Could not resolve hostname server: Name or service not known
I'm trying to test my honeypot but for some reason I'm getting this message:
ssh root@server 10.0.2.15
ssh: Could not resolve hostname server: Name or service not known
What I'm doing wrong?
ssh
|
show 1 more comment
I'm trying to test my honeypot but for some reason I'm getting this message:
ssh root@server 10.0.2.15
ssh: Could not resolve hostname server: Name or service not known
What I'm doing wrong?
ssh
1
Add what command did you use for ssh.
– Rahul
Jan 21 '17 at 23:47
3
the correct syntax for ssh would be thisssh root@10.0.2.15
– WooJoo
Jan 22 '17 at 0:36
@WooJoo Looks like you have the answer ;)
– Seth♦
Jan 22 '17 at 4:52
@WooJoo yes, that's the right answer , I can't believe I made such a simple mistake
– ebatinstitute
Jan 22 '17 at 8:18
@WooJoo Post the answer ;)
– pa4080
Jan 22 '17 at 8:26
|
show 1 more comment
I'm trying to test my honeypot but for some reason I'm getting this message:
ssh root@server 10.0.2.15
ssh: Could not resolve hostname server: Name or service not known
What I'm doing wrong?
ssh
I'm trying to test my honeypot but for some reason I'm getting this message:
ssh root@server 10.0.2.15
ssh: Could not resolve hostname server: Name or service not known
What I'm doing wrong?
ssh
ssh
edited Jan 22 '17 at 8:22
pa4080
14.4k52670
14.4k52670
asked Jan 21 '17 at 23:30
ebatinstituteebatinstitute
76239
76239
1
Add what command did you use for ssh.
– Rahul
Jan 21 '17 at 23:47
3
the correct syntax for ssh would be thisssh root@10.0.2.15
– WooJoo
Jan 22 '17 at 0:36
@WooJoo Looks like you have the answer ;)
– Seth♦
Jan 22 '17 at 4:52
@WooJoo yes, that's the right answer , I can't believe I made such a simple mistake
– ebatinstitute
Jan 22 '17 at 8:18
@WooJoo Post the answer ;)
– pa4080
Jan 22 '17 at 8:26
|
show 1 more comment
1
Add what command did you use for ssh.
– Rahul
Jan 21 '17 at 23:47
3
the correct syntax for ssh would be thisssh root@10.0.2.15
– WooJoo
Jan 22 '17 at 0:36
@WooJoo Looks like you have the answer ;)
– Seth♦
Jan 22 '17 at 4:52
@WooJoo yes, that's the right answer , I can't believe I made such a simple mistake
– ebatinstitute
Jan 22 '17 at 8:18
@WooJoo Post the answer ;)
– pa4080
Jan 22 '17 at 8:26
1
1
Add what command did you use for ssh.
– Rahul
Jan 21 '17 at 23:47
Add what command did you use for ssh.
– Rahul
Jan 21 '17 at 23:47
3
3
the correct syntax for ssh would be this
ssh root@10.0.2.15
– WooJoo
Jan 22 '17 at 0:36
the correct syntax for ssh would be this
ssh root@10.0.2.15
– WooJoo
Jan 22 '17 at 0:36
@WooJoo Looks like you have the answer ;)
– Seth♦
Jan 22 '17 at 4:52
@WooJoo Looks like you have the answer ;)
– Seth♦
Jan 22 '17 at 4:52
@WooJoo yes, that's the right answer , I can't believe I made such a simple mistake
– ebatinstitute
Jan 22 '17 at 8:18
@WooJoo yes, that's the right answer , I can't believe I made such a simple mistake
– ebatinstitute
Jan 22 '17 at 8:18
@WooJoo Post the answer ;)
– pa4080
Jan 22 '17 at 8:26
@WooJoo Post the answer ;)
– pa4080
Jan 22 '17 at 8:26
|
show 1 more comment
3 Answers
3
active
oldest
votes
To connect to an ssh server in a terminal you need:
- The call
ssh
to start the program - The user name, which in your case is
root
- An
@
sign separating the user name from the server identification - The IP address or name of the server, which in your case is
10.0.2.15
Assembled, the command looks like:
ssh root@10.0.2.15
in general terms, ssh user@server
.
Alternatively, you can use the -l
option to directly specify the login name and skip the @
syntax:
ssh 10.0.2.15 -l root
add a comment |
As WooJoo stated, you need to tell it a valid server to connect to. If you wanted to use the form $ ssh root@server
you can, but you would need to have server
as an entry in /etc/hosts
or your dns server (which is not the case or you would not have had an error), or an entry in a file called config
located typically at /home/username/.ssh/config
.
A sample /etc/hosts entry would look like:
# Sample /etc/hosts file
127.0.0.1 localhost
127.0.1.1 computerhostnamehere
10.0.2.15 server
and a sample /home/username/.ssh/config could be as simple as:
Host server
HostName 10.0.2.15
User root
This would get you the basic functionality you are looking for. There are many more options available for placing in the ~/.ssh/config
file.
See man ssh
for more options :)
add a comment |
Please try by adding server entry to which you are trying to ssh in /etc/hosts file of machine from where you want to do ssh
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f874724%2fssh-could-not-resolve-hostname-server-name-or-service-not-known%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
To connect to an ssh server in a terminal you need:
- The call
ssh
to start the program - The user name, which in your case is
root
- An
@
sign separating the user name from the server identification - The IP address or name of the server, which in your case is
10.0.2.15
Assembled, the command looks like:
ssh root@10.0.2.15
in general terms, ssh user@server
.
Alternatively, you can use the -l
option to directly specify the login name and skip the @
syntax:
ssh 10.0.2.15 -l root
add a comment |
To connect to an ssh server in a terminal you need:
- The call
ssh
to start the program - The user name, which in your case is
root
- An
@
sign separating the user name from the server identification - The IP address or name of the server, which in your case is
10.0.2.15
Assembled, the command looks like:
ssh root@10.0.2.15
in general terms, ssh user@server
.
Alternatively, you can use the -l
option to directly specify the login name and skip the @
syntax:
ssh 10.0.2.15 -l root
add a comment |
To connect to an ssh server in a terminal you need:
- The call
ssh
to start the program - The user name, which in your case is
root
- An
@
sign separating the user name from the server identification - The IP address or name of the server, which in your case is
10.0.2.15
Assembled, the command looks like:
ssh root@10.0.2.15
in general terms, ssh user@server
.
Alternatively, you can use the -l
option to directly specify the login name and skip the @
syntax:
ssh 10.0.2.15 -l root
To connect to an ssh server in a terminal you need:
- The call
ssh
to start the program - The user name, which in your case is
root
- An
@
sign separating the user name from the server identification - The IP address or name of the server, which in your case is
10.0.2.15
Assembled, the command looks like:
ssh root@10.0.2.15
in general terms, ssh user@server
.
Alternatively, you can use the -l
option to directly specify the login name and skip the @
syntax:
ssh 10.0.2.15 -l root
edited Jan 9 '18 at 18:30
guntbert
9,311133170
9,311133170
answered Jan 22 '17 at 12:27
WooJooWooJoo
1378
1378
add a comment |
add a comment |
As WooJoo stated, you need to tell it a valid server to connect to. If you wanted to use the form $ ssh root@server
you can, but you would need to have server
as an entry in /etc/hosts
or your dns server (which is not the case or you would not have had an error), or an entry in a file called config
located typically at /home/username/.ssh/config
.
A sample /etc/hosts entry would look like:
# Sample /etc/hosts file
127.0.0.1 localhost
127.0.1.1 computerhostnamehere
10.0.2.15 server
and a sample /home/username/.ssh/config could be as simple as:
Host server
HostName 10.0.2.15
User root
This would get you the basic functionality you are looking for. There are many more options available for placing in the ~/.ssh/config
file.
See man ssh
for more options :)
add a comment |
As WooJoo stated, you need to tell it a valid server to connect to. If you wanted to use the form $ ssh root@server
you can, but you would need to have server
as an entry in /etc/hosts
or your dns server (which is not the case or you would not have had an error), or an entry in a file called config
located typically at /home/username/.ssh/config
.
A sample /etc/hosts entry would look like:
# Sample /etc/hosts file
127.0.0.1 localhost
127.0.1.1 computerhostnamehere
10.0.2.15 server
and a sample /home/username/.ssh/config could be as simple as:
Host server
HostName 10.0.2.15
User root
This would get you the basic functionality you are looking for. There are many more options available for placing in the ~/.ssh/config
file.
See man ssh
for more options :)
add a comment |
As WooJoo stated, you need to tell it a valid server to connect to. If you wanted to use the form $ ssh root@server
you can, but you would need to have server
as an entry in /etc/hosts
or your dns server (which is not the case or you would not have had an error), or an entry in a file called config
located typically at /home/username/.ssh/config
.
A sample /etc/hosts entry would look like:
# Sample /etc/hosts file
127.0.0.1 localhost
127.0.1.1 computerhostnamehere
10.0.2.15 server
and a sample /home/username/.ssh/config could be as simple as:
Host server
HostName 10.0.2.15
User root
This would get you the basic functionality you are looking for. There are many more options available for placing in the ~/.ssh/config
file.
See man ssh
for more options :)
As WooJoo stated, you need to tell it a valid server to connect to. If you wanted to use the form $ ssh root@server
you can, but you would need to have server
as an entry in /etc/hosts
or your dns server (which is not the case or you would not have had an error), or an entry in a file called config
located typically at /home/username/.ssh/config
.
A sample /etc/hosts entry would look like:
# Sample /etc/hosts file
127.0.0.1 localhost
127.0.1.1 computerhostnamehere
10.0.2.15 server
and a sample /home/username/.ssh/config could be as simple as:
Host server
HostName 10.0.2.15
User root
This would get you the basic functionality you are looking for. There are many more options available for placing in the ~/.ssh/config
file.
See man ssh
for more options :)
answered Jun 13 '17 at 21:04
ben-Nabiy Derushben-Nabiy Derush
496214
496214
add a comment |
add a comment |
Please try by adding server entry to which you are trying to ssh in /etc/hosts file of machine from where you want to do ssh
add a comment |
Please try by adding server entry to which you are trying to ssh in /etc/hosts file of machine from where you want to do ssh
add a comment |
Please try by adding server entry to which you are trying to ssh in /etc/hosts file of machine from where you want to do ssh
Please try by adding server entry to which you are trying to ssh in /etc/hosts file of machine from where you want to do ssh
answered Feb 8 at 10:24
patke pravinpatke pravin
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f874724%2fssh-could-not-resolve-hostname-server-name-or-service-not-known%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
1
Add what command did you use for ssh.
– Rahul
Jan 21 '17 at 23:47
3
the correct syntax for ssh would be this
ssh root@10.0.2.15
– WooJoo
Jan 22 '17 at 0:36
@WooJoo Looks like you have the answer ;)
– Seth♦
Jan 22 '17 at 4:52
@WooJoo yes, that's the right answer , I can't believe I made such a simple mistake
– ebatinstitute
Jan 22 '17 at 8:18
@WooJoo Post the answer ;)
– pa4080
Jan 22 '17 at 8:26