-3

I have hosts file in my master linux machine and this host file include more then 1000 IP address that defined many components as Linux and solaris machine and switches and routers and EMC port and so on

example

   192.9.200.23  LinuxM26
   192.9.200.24 SolarisM476
   192.9.200.25 SolarisM476
   192.9.200.26 RouterF938374
   192.9.200.27 CiscoSitch47846
   192.9.200.28 MasterLinux376
   192.9.200.29 SwitchCisco385736
   172.17.80.24 UnixWare7.1.1-854776
   172.17.80.24 LBA-frhr
   172.17.80.25 EMC-storage329478245
   .
   .
   .
   .

my target is to perform auto scp process from all the linux & solaris machine that defined in the hosts file to my master linux machine

the problem is that some hosts in the host file are not linux or solaris as switches and routes

so I was thinking how to perfrom s hort test that will tell us if the target hosts is linux/solaris or other as switch/router/etc

I ask all this because I can’t perform scp/ssh to target switch/router because this will give alarm from the switch ( because the scp/ssh )

so I will happy to get some process that will identify the target host is switch or router without to use scp/ssh

maihabunash
  • 443
  • 1
  • 11
  • 25

1 Answers1

1

Nmap is your best shot in such cases. If you have nmap installed, just run:

nmap -v -O --osscan-guess
Falcon Momot
  • 25,244
  • 15
  • 63
  • 92
ostendali
  • 403
  • 2
  • 4
  • what I can do if nmap not installed on my linux machine ( in case we cant install it ) , other alternative? – maihabunash Oct 07 '15 at 09:59
  • 3
    @maihabunash: What kind of environment are you running? You have 1000 machines without any database of what is what (listed in the hosts file!), you can't install basic tools to help you out - maybe get your fundamental operations straight first. – Sven Oct 07 '15 at 10:23
  • If simply trying to `scp/ssh` into an arbitrary host can "set off alarms", running `nmap` will probably get him fired as it's going to try all kinds of different connections to try to identify a host. – Andrew Henle Oct 07 '15 at 14:44