Archive for the “Linux Tutorials” Category

Linux Tips And Tricks About SSH And Sockets

Count the number of SSH commands

SSH connections from a local machine to a remote machine. The following command will give you the count:

ss | grep -vE ‘State’ | awk ‘{print $1 “–>” “Local(“$4″)” “to” “Remote(“$5″)”}’ |grep -e ssh |wc -l

And the following command will print out the SSH connections from the local machine to the remote machine.

ss | grep -vE ‘State’ | awk ‘{print $1 “–>” “Local(“$4″)” “to” “Remote(“$5″)”}’ |grep -e ssh

Sep 10, 2009 Posted Under: Linux Tutorials   Read More

What Is SNMP?

In today’s complex network of routers, switches, and servers, it can seem like a daunting task to manage all the devices on your network and make sure they’re not only up and running but performing optimally. This is where the Simple Network Management Protocol (SNMP) can help. SNMP was introduced in 1988 to meet the growing need for a standard for managing Internet Protocol (IP) devices. SNMP provides its users with a “simple” set of operations that allows these devices to be managed remotely.

The core of SNMP is a simple set of operations (and the information these operations gather) that gives administrators the ability to change the state of some SNMP-based device. For example, you can use SNMP to shut down an interface on your router or check the speed at which your Ethernet interface is operating. SNMP can even monitor the temperature on your switch  and warn you when it is too high.

Sep 9, 2009 Posted Under: Linux Tutorials   Read More