how to check OS is linux or other?












0















we need to check if the following remote ip's are linux OS or other as win



example



12.43.223.4
23.54.67.3
23.5.6.3


we have Linux machine - redhat , and from this machine we need to identify the remote machine if they are Linux or other ?



as I know we can identify by nmap



but I want to find other way since nmap not installed on production machines



so any suggestion how to check remote machine is Linux or other ? ( not by nmap )










share|improve this question




















  • 1





    are there any standards enforced at all? Do Windows systems have certain services running? Do Linux ones?

    – Jeff Schaller
    15 hours ago






  • 1





    Are the IP addresses yours?

    – Kusalananda
    14 hours ago






  • 2





    You cannot identify by nmap. nmap can take a guess based on how the remote system responds to certain network traffic but this is a guess and it can be easily fooled.

    – Doug O'Neal
    14 hours ago






  • 2





    NMAP Operating System Detection, while a noble attempt, is fundamentally flawed by reality and simply how Internet protocol works. It's right there in their readme When Nmap Guesses Wrong.

    – ron
    14 hours ago








  • 1





    Is flipping a coin, head or tails, totally out of question?

    – Rui F Ribeiro
    14 hours ago
















0















we need to check if the following remote ip's are linux OS or other as win



example



12.43.223.4
23.54.67.3
23.5.6.3


we have Linux machine - redhat , and from this machine we need to identify the remote machine if they are Linux or other ?



as I know we can identify by nmap



but I want to find other way since nmap not installed on production machines



so any suggestion how to check remote machine is Linux or other ? ( not by nmap )










share|improve this question




















  • 1





    are there any standards enforced at all? Do Windows systems have certain services running? Do Linux ones?

    – Jeff Schaller
    15 hours ago






  • 1





    Are the IP addresses yours?

    – Kusalananda
    14 hours ago






  • 2





    You cannot identify by nmap. nmap can take a guess based on how the remote system responds to certain network traffic but this is a guess and it can be easily fooled.

    – Doug O'Neal
    14 hours ago






  • 2





    NMAP Operating System Detection, while a noble attempt, is fundamentally flawed by reality and simply how Internet protocol works. It's right there in their readme When Nmap Guesses Wrong.

    – ron
    14 hours ago








  • 1





    Is flipping a coin, head or tails, totally out of question?

    – Rui F Ribeiro
    14 hours ago














0












0








0








we need to check if the following remote ip's are linux OS or other as win



example



12.43.223.4
23.54.67.3
23.5.6.3


we have Linux machine - redhat , and from this machine we need to identify the remote machine if they are Linux or other ?



as I know we can identify by nmap



but I want to find other way since nmap not installed on production machines



so any suggestion how to check remote machine is Linux or other ? ( not by nmap )










share|improve this question
















we need to check if the following remote ip's are linux OS or other as win



example



12.43.223.4
23.54.67.3
23.5.6.3


we have Linux machine - redhat , and from this machine we need to identify the remote machine if they are Linux or other ?



as I know we can identify by nmap



but I want to find other way since nmap not installed on production machines



so any suggestion how to check remote machine is Linux or other ? ( not by nmap )







linux shell-script






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 15 hours ago









Jeff Schaller

39.5k1054126




39.5k1054126










asked 15 hours ago









yaelyael

2,49612363




2,49612363








  • 1





    are there any standards enforced at all? Do Windows systems have certain services running? Do Linux ones?

    – Jeff Schaller
    15 hours ago






  • 1





    Are the IP addresses yours?

    – Kusalananda
    14 hours ago






  • 2





    You cannot identify by nmap. nmap can take a guess based on how the remote system responds to certain network traffic but this is a guess and it can be easily fooled.

    – Doug O'Neal
    14 hours ago






  • 2





    NMAP Operating System Detection, while a noble attempt, is fundamentally flawed by reality and simply how Internet protocol works. It's right there in their readme When Nmap Guesses Wrong.

    – ron
    14 hours ago








  • 1





    Is flipping a coin, head or tails, totally out of question?

    – Rui F Ribeiro
    14 hours ago














  • 1





    are there any standards enforced at all? Do Windows systems have certain services running? Do Linux ones?

    – Jeff Schaller
    15 hours ago






  • 1





    Are the IP addresses yours?

    – Kusalananda
    14 hours ago






  • 2





    You cannot identify by nmap. nmap can take a guess based on how the remote system responds to certain network traffic but this is a guess and it can be easily fooled.

    – Doug O'Neal
    14 hours ago






  • 2





    NMAP Operating System Detection, while a noble attempt, is fundamentally flawed by reality and simply how Internet protocol works. It's right there in their readme When Nmap Guesses Wrong.

    – ron
    14 hours ago








  • 1





    Is flipping a coin, head or tails, totally out of question?

    – Rui F Ribeiro
    14 hours ago








1




1





are there any standards enforced at all? Do Windows systems have certain services running? Do Linux ones?

– Jeff Schaller
15 hours ago





are there any standards enforced at all? Do Windows systems have certain services running? Do Linux ones?

– Jeff Schaller
15 hours ago




1




1





Are the IP addresses yours?

– Kusalananda
14 hours ago





Are the IP addresses yours?

– Kusalananda
14 hours ago




2




2





You cannot identify by nmap. nmap can take a guess based on how the remote system responds to certain network traffic but this is a guess and it can be easily fooled.

– Doug O'Neal
14 hours ago





You cannot identify by nmap. nmap can take a guess based on how the remote system responds to certain network traffic but this is a guess and it can be easily fooled.

– Doug O'Neal
14 hours ago




2




2





NMAP Operating System Detection, while a noble attempt, is fundamentally flawed by reality and simply how Internet protocol works. It's right there in their readme When Nmap Guesses Wrong.

– ron
14 hours ago







NMAP Operating System Detection, while a noble attempt, is fundamentally flawed by reality and simply how Internet protocol works. It's right there in their readme When Nmap Guesses Wrong.

– ron
14 hours ago






1




1





Is flipping a coin, head or tails, totally out of question?

– Rui F Ribeiro
14 hours ago





Is flipping a coin, head or tails, totally out of question?

– Rui F Ribeiro
14 hours ago










2 Answers
2






active

oldest

votes


















0














for i in  hostname1 hostname2; 
do
ssh -o 'StrictHostKeyChecking no' $i -A <<'EOF'
uname -a | awk '{if($0 ~ /Linux/){print "Its Linux os"}else{print "its not linux os"}}'
EOF
done





share|improve this answer



















  • 1





    For all that you know, it may be a router between you and the given IP address that answers on port 22 (if anything answers at all). It may not be any of the machines hostname1 or hostname2.

    – Kusalananda
    14 hours ago













  • So if hostname2 is Windows and it's (reasonably enough) not running an SSH service you'll report nothing but an error about not being able to connect.

    – roaima
    10 hours ago



















4














If I understand your question correctly, you are asking;




How can the operating system of a computer on a network be identified without logging in to it




It cannot.
Any computer system on a network, assuming that network is a typical IP (internet protocol) based on TCP/IP communicates based on that protocol. And if that is all you have to work with, then:




  • a computer on a network can be configured to be invisible first of all, such as not respond to ping among other things,

  • but if it does respond or some indication can be seen that there is this computer system on the network, how can you deduce if it is windows, Linux, macOS, Android, other? You can't: The IP/TCP protocol does not provide for that to happen.


I suppose if a system is somehow configured at a low enough level to include that kind of information in the TCP/IP header in each packet that gets sent out then maybe that can used to work with, but would be very custom. Otherwise there is no reliable I know of unless you can log in to that system. If you log in to a system via SSH protocol, well just the same because the SSH protocol is OS-independent, so if you see a computer system responding via SSH on port 22, any computer device with any operating system can do that as long as they follow the SSH protocol which then happens on top of the Internet Protocol.



This is of course is the reason why IP is so great, it allows communication between any device (regardless of operating system) as long as they follow the same internet protocol. An analogy would be I don't need to know if you are male, female, any other characteristic, as long as you follow the a given language protocol (English language in this case) then we can communicate at some level.



You may wish to read the IPV4 Wikipedia article, in addition to the history of the internet.






share|improve this answer


























  • In fact, services respond with banners or they may respond somewhat differently in their protocol responses. That's why nmap can and does identify the OS of remote systems. It's not always completely accurate, but it can certainly be done.

    – Christopher
    14 hours ago






  • 1





    nmap tries to identify the OS of remote systems. It often fails so I take exception to the 'can and does' identify OSes.

    – Doug O'Neal
    11 hours ago











  • It is trivial to spoof nmap, although it is somewhat reliable with unhardened OS

    – Panther
    3 hours ago











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495099%2fhow-to-check-os-is-linux-or-other%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









0














for i in  hostname1 hostname2; 
do
ssh -o 'StrictHostKeyChecking no' $i -A <<'EOF'
uname -a | awk '{if($0 ~ /Linux/){print "Its Linux os"}else{print "its not linux os"}}'
EOF
done





share|improve this answer



















  • 1





    For all that you know, it may be a router between you and the given IP address that answers on port 22 (if anything answers at all). It may not be any of the machines hostname1 or hostname2.

    – Kusalananda
    14 hours ago













  • So if hostname2 is Windows and it's (reasonably enough) not running an SSH service you'll report nothing but an error about not being able to connect.

    – roaima
    10 hours ago
















0














for i in  hostname1 hostname2; 
do
ssh -o 'StrictHostKeyChecking no' $i -A <<'EOF'
uname -a | awk '{if($0 ~ /Linux/){print "Its Linux os"}else{print "its not linux os"}}'
EOF
done





share|improve this answer



















  • 1





    For all that you know, it may be a router between you and the given IP address that answers on port 22 (if anything answers at all). It may not be any of the machines hostname1 or hostname2.

    – Kusalananda
    14 hours ago













  • So if hostname2 is Windows and it's (reasonably enough) not running an SSH service you'll report nothing but an error about not being able to connect.

    – roaima
    10 hours ago














0












0








0







for i in  hostname1 hostname2; 
do
ssh -o 'StrictHostKeyChecking no' $i -A <<'EOF'
uname -a | awk '{if($0 ~ /Linux/){print "Its Linux os"}else{print "its not linux os"}}'
EOF
done





share|improve this answer













for i in  hostname1 hostname2; 
do
ssh -o 'StrictHostKeyChecking no' $i -A <<'EOF'
uname -a | awk '{if($0 ~ /Linux/){print "Its Linux os"}else{print "its not linux os"}}'
EOF
done






share|improve this answer












share|improve this answer



share|improve this answer










answered 14 hours ago









Praveen Kumar BSPraveen Kumar BS

1,340138




1,340138








  • 1





    For all that you know, it may be a router between you and the given IP address that answers on port 22 (if anything answers at all). It may not be any of the machines hostname1 or hostname2.

    – Kusalananda
    14 hours ago













  • So if hostname2 is Windows and it's (reasonably enough) not running an SSH service you'll report nothing but an error about not being able to connect.

    – roaima
    10 hours ago














  • 1





    For all that you know, it may be a router between you and the given IP address that answers on port 22 (if anything answers at all). It may not be any of the machines hostname1 or hostname2.

    – Kusalananda
    14 hours ago













  • So if hostname2 is Windows and it's (reasonably enough) not running an SSH service you'll report nothing but an error about not being able to connect.

    – roaima
    10 hours ago








1




1





For all that you know, it may be a router between you and the given IP address that answers on port 22 (if anything answers at all). It may not be any of the machines hostname1 or hostname2.

– Kusalananda
14 hours ago







For all that you know, it may be a router between you and the given IP address that answers on port 22 (if anything answers at all). It may not be any of the machines hostname1 or hostname2.

– Kusalananda
14 hours ago















So if hostname2 is Windows and it's (reasonably enough) not running an SSH service you'll report nothing but an error about not being able to connect.

– roaima
10 hours ago





So if hostname2 is Windows and it's (reasonably enough) not running an SSH service you'll report nothing but an error about not being able to connect.

– roaima
10 hours ago













4














If I understand your question correctly, you are asking;




How can the operating system of a computer on a network be identified without logging in to it




It cannot.
Any computer system on a network, assuming that network is a typical IP (internet protocol) based on TCP/IP communicates based on that protocol. And if that is all you have to work with, then:




  • a computer on a network can be configured to be invisible first of all, such as not respond to ping among other things,

  • but if it does respond or some indication can be seen that there is this computer system on the network, how can you deduce if it is windows, Linux, macOS, Android, other? You can't: The IP/TCP protocol does not provide for that to happen.


I suppose if a system is somehow configured at a low enough level to include that kind of information in the TCP/IP header in each packet that gets sent out then maybe that can used to work with, but would be very custom. Otherwise there is no reliable I know of unless you can log in to that system. If you log in to a system via SSH protocol, well just the same because the SSH protocol is OS-independent, so if you see a computer system responding via SSH on port 22, any computer device with any operating system can do that as long as they follow the SSH protocol which then happens on top of the Internet Protocol.



This is of course is the reason why IP is so great, it allows communication between any device (regardless of operating system) as long as they follow the same internet protocol. An analogy would be I don't need to know if you are male, female, any other characteristic, as long as you follow the a given language protocol (English language in this case) then we can communicate at some level.



You may wish to read the IPV4 Wikipedia article, in addition to the history of the internet.






share|improve this answer


























  • In fact, services respond with banners or they may respond somewhat differently in their protocol responses. That's why nmap can and does identify the OS of remote systems. It's not always completely accurate, but it can certainly be done.

    – Christopher
    14 hours ago






  • 1





    nmap tries to identify the OS of remote systems. It often fails so I take exception to the 'can and does' identify OSes.

    – Doug O'Neal
    11 hours ago











  • It is trivial to spoof nmap, although it is somewhat reliable with unhardened OS

    – Panther
    3 hours ago
















4














If I understand your question correctly, you are asking;




How can the operating system of a computer on a network be identified without logging in to it




It cannot.
Any computer system on a network, assuming that network is a typical IP (internet protocol) based on TCP/IP communicates based on that protocol. And if that is all you have to work with, then:




  • a computer on a network can be configured to be invisible first of all, such as not respond to ping among other things,

  • but if it does respond or some indication can be seen that there is this computer system on the network, how can you deduce if it is windows, Linux, macOS, Android, other? You can't: The IP/TCP protocol does not provide for that to happen.


I suppose if a system is somehow configured at a low enough level to include that kind of information in the TCP/IP header in each packet that gets sent out then maybe that can used to work with, but would be very custom. Otherwise there is no reliable I know of unless you can log in to that system. If you log in to a system via SSH protocol, well just the same because the SSH protocol is OS-independent, so if you see a computer system responding via SSH on port 22, any computer device with any operating system can do that as long as they follow the SSH protocol which then happens on top of the Internet Protocol.



This is of course is the reason why IP is so great, it allows communication between any device (regardless of operating system) as long as they follow the same internet protocol. An analogy would be I don't need to know if you are male, female, any other characteristic, as long as you follow the a given language protocol (English language in this case) then we can communicate at some level.



You may wish to read the IPV4 Wikipedia article, in addition to the history of the internet.






share|improve this answer


























  • In fact, services respond with banners or they may respond somewhat differently in their protocol responses. That's why nmap can and does identify the OS of remote systems. It's not always completely accurate, but it can certainly be done.

    – Christopher
    14 hours ago






  • 1





    nmap tries to identify the OS of remote systems. It often fails so I take exception to the 'can and does' identify OSes.

    – Doug O'Neal
    11 hours ago











  • It is trivial to spoof nmap, although it is somewhat reliable with unhardened OS

    – Panther
    3 hours ago














4












4








4







If I understand your question correctly, you are asking;




How can the operating system of a computer on a network be identified without logging in to it




It cannot.
Any computer system on a network, assuming that network is a typical IP (internet protocol) based on TCP/IP communicates based on that protocol. And if that is all you have to work with, then:




  • a computer on a network can be configured to be invisible first of all, such as not respond to ping among other things,

  • but if it does respond or some indication can be seen that there is this computer system on the network, how can you deduce if it is windows, Linux, macOS, Android, other? You can't: The IP/TCP protocol does not provide for that to happen.


I suppose if a system is somehow configured at a low enough level to include that kind of information in the TCP/IP header in each packet that gets sent out then maybe that can used to work with, but would be very custom. Otherwise there is no reliable I know of unless you can log in to that system. If you log in to a system via SSH protocol, well just the same because the SSH protocol is OS-independent, so if you see a computer system responding via SSH on port 22, any computer device with any operating system can do that as long as they follow the SSH protocol which then happens on top of the Internet Protocol.



This is of course is the reason why IP is so great, it allows communication between any device (regardless of operating system) as long as they follow the same internet protocol. An analogy would be I don't need to know if you are male, female, any other characteristic, as long as you follow the a given language protocol (English language in this case) then we can communicate at some level.



You may wish to read the IPV4 Wikipedia article, in addition to the history of the internet.






share|improve this answer















If I understand your question correctly, you are asking;




How can the operating system of a computer on a network be identified without logging in to it




It cannot.
Any computer system on a network, assuming that network is a typical IP (internet protocol) based on TCP/IP communicates based on that protocol. And if that is all you have to work with, then:




  • a computer on a network can be configured to be invisible first of all, such as not respond to ping among other things,

  • but if it does respond or some indication can be seen that there is this computer system on the network, how can you deduce if it is windows, Linux, macOS, Android, other? You can't: The IP/TCP protocol does not provide for that to happen.


I suppose if a system is somehow configured at a low enough level to include that kind of information in the TCP/IP header in each packet that gets sent out then maybe that can used to work with, but would be very custom. Otherwise there is no reliable I know of unless you can log in to that system. If you log in to a system via SSH protocol, well just the same because the SSH protocol is OS-independent, so if you see a computer system responding via SSH on port 22, any computer device with any operating system can do that as long as they follow the SSH protocol which then happens on top of the Internet Protocol.



This is of course is the reason why IP is so great, it allows communication between any device (regardless of operating system) as long as they follow the same internet protocol. An analogy would be I don't need to know if you are male, female, any other characteristic, as long as you follow the a given language protocol (English language in this case) then we can communicate at some level.



You may wish to read the IPV4 Wikipedia article, in addition to the history of the internet.







share|improve this answer














share|improve this answer



share|improve this answer








edited 11 hours ago









Fabby

3,84811229




3,84811229










answered 14 hours ago









ronron

9841714




9841714













  • In fact, services respond with banners or they may respond somewhat differently in their protocol responses. That's why nmap can and does identify the OS of remote systems. It's not always completely accurate, but it can certainly be done.

    – Christopher
    14 hours ago






  • 1





    nmap tries to identify the OS of remote systems. It often fails so I take exception to the 'can and does' identify OSes.

    – Doug O'Neal
    11 hours ago











  • It is trivial to spoof nmap, although it is somewhat reliable with unhardened OS

    – Panther
    3 hours ago



















  • In fact, services respond with banners or they may respond somewhat differently in their protocol responses. That's why nmap can and does identify the OS of remote systems. It's not always completely accurate, but it can certainly be done.

    – Christopher
    14 hours ago






  • 1





    nmap tries to identify the OS of remote systems. It often fails so I take exception to the 'can and does' identify OSes.

    – Doug O'Neal
    11 hours ago











  • It is trivial to spoof nmap, although it is somewhat reliable with unhardened OS

    – Panther
    3 hours ago

















In fact, services respond with banners or they may respond somewhat differently in their protocol responses. That's why nmap can and does identify the OS of remote systems. It's not always completely accurate, but it can certainly be done.

– Christopher
14 hours ago





In fact, services respond with banners or they may respond somewhat differently in their protocol responses. That's why nmap can and does identify the OS of remote systems. It's not always completely accurate, but it can certainly be done.

– Christopher
14 hours ago




1




1





nmap tries to identify the OS of remote systems. It often fails so I take exception to the 'can and does' identify OSes.

– Doug O'Neal
11 hours ago





nmap tries to identify the OS of remote systems. It often fails so I take exception to the 'can and does' identify OSes.

– Doug O'Neal
11 hours ago













It is trivial to spoof nmap, although it is somewhat reliable with unhardened OS

– Panther
3 hours ago





It is trivial to spoof nmap, although it is somewhat reliable with unhardened OS

– Panther
3 hours ago


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495099%2fhow-to-check-os-is-linux-or-other%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Loup dans la culture

How to solve the problem of ntp “Unable to contact time server” from KDE?

ASUS Zenbook UX433/UX333 — Configure Touchpad-embedded numpad on Linux