Sunday, August 18, 2013

LINUX-NETWORKING-COMMAND

**********************************************************************************************************************************************************************
                            NETWORKING-INFO-COMMANDS
                        ****************************************
                       
#arp-scan  --interface=eth0/1  192.168.3.0/24   [ To scan all the ip and MAC in LAN ]

#arp-scan  --interface=eth0/1   192.168.3.0/24   |grep   IP/MAC/Any word 

$nmap -v -sP  192.168.1.0/24                  [ Scan your server for open ports and up hosts ]

$sudo /sbin/mii-tool                                 [ to find the connectivity of network link is ok or not ]

$nm-tool                                                  [ Network Manager tool to find the details of the network ]

$findsmb                                                  [ find the running samba-server in the LAN from client]

$findsmb -r                                              [ from the root ]

$wget  -p                                                 [ download the any thing from the command mode ]

$netstat -ant                                            [ all establish network on our system and server ]

$netstat  -an |grep  nfs                            [ to find out the connection established with 'nfs' ]

$netstat  -nte                                           [  ]

$netstat  -ant     |grep  23

#ss  -a                                                     [ another utility to investigate sockets ]

#ss  -l

#ss -o

#ss -s

#ss -4  state  all 

#system-config-network-cmd                 [ all about network ]

#ntsysv                                                   [ to edit and show all runing services ]

#setup                                                    [ " ]

$ls  /etc/sysconfig/networking/devices  [ to check the lan card ]

#tcpdump  -i  eth0  'udp' port  53          [   ]

#strace                                                  [ trace system calls and signals]

#ciptool   -h                                           [ Blue-tooth Common ISDN Access Profile (CIP)]

#ciptool  search                                    [ search the Blue-tooth devices ]

#ciptool   show                                     [ show the devices ]

#ciptool   connect                                 [ connect the blue-tooth devices ]

#ciptool   release

#ip  link

#ip  route

#ethtool   eth0/1

#route

#route -n

#route -e

#mtr                                                       [ a network diagnostic tool ]

#       
**********************************************************************************************************************************************************************
Q. When i try to ssh our server its syas error : "RSA host key has been change for (your system ip) and Host key verification failed .


Ans. : - Add correct host key in known_hosts, multiple ssh host keys per host-name.

        1. Get the rsa key of your server.

        #ssh-keyscan  -t  rsa  serve_ip

        (you will get sum key like 'AAAAB3.......' then you copy this key from server_ip till last )


        2. And on the client add this key to  " ~/.ssh/known_hosts "

        #server_ip  ssh_rsa AAABnX.....   ( past here the coyed key and enter )
       
        (Now you can access your server from 'ssh' it will not ask you the key )



$rpm -qa \*-release\*                                [ all new release package from red-hat ]

$cat /etc/redhat-release                           [ os release ]

$ rpm -qa yum\* rpm-\* python | sort      [ all the packages of yum server ]

$ls /etc/yum.repos.d

$cat /etc/yum.conf                                    [ To find the all configuration of the yum server ]

$yum repolist all                                       [ all the repos list  ]

$rpm -qa kernel\* | sort

$ ip    link                                                  [ to check link of the ip ]

$ man  ip                                                   [  to find more option of  IP link ]  

#mtr                                                          [ a network diagnostic tool ]

#mtr -i  IP address                                  [to find about any particular ip's status]

# man mtr

#route -n                                                   [ to find the route getway ip ]

#man  route                                              [ all about 'route' ]

#netstat   -ant

#netstat    -ant  |grep  23

#
  
--------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment