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  LinuxM26 SolarisM476 SolarisM476 RouterF938374 CiscoSitch47846 MasterLinux376 SwitchCisco385736 UnixWare7.1.1-854776 LBA-frhr 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

  • 4
    Just checked my watch, yep, still 2015 - thought I'd driven to work in a Delorean today
    – Chopper3
    Oct 7 '15 at 9:40

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

nmap -v -O --osscan-guess
  • what I can do if nmap not installed on my linux machine ( in case we cant install it ) , other alternative? Oct 7 '15 at 9: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 7 '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. Oct 7 '15 at 14:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.