Find the answer to your Linux question:
Results 1 to 3 of 3
Hi All, how i can monitor ssh and putty connected connection for network and generate report of that user connect outside of network useing internet connection i want source ip ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    4

    22 port connection monitoring


    Hi All,

    how i can monitor ssh and putty connected connection for network and generate report of that

    user connect outside of network useing internet connection

    i want source ip and destination ip

    regards,

    sandy

  2. #2
    Just Joined!
    Join Date
    May 2011
    Location
    Central FL
    Posts
    90
    Your question (and needs) are overall unclear. I believe what you are seeking is:
    Code:
    echo -e "Source\tDestination"; netstat -n | grep "\:22 " | awk '{ print $4"\t"$5 }'
    If not, then you'll need to clarify your wants further.

  3. #3
    Just Joined! kerim's Avatar
    Join Date
    May 2010
    Location
    Istanbul
    Posts
    15

    Logging and monitoring ssh ( 22 ) port

    You question's answer is:

    To monitor:
    Code:
    tcpdump  -i eth0 -n port 22
    To pcap log file:
    Code:
    tcpdump  -i eth0 -n port 22 -w mylogfile.pcap
    Reading pcap log file, hence you need pcap analyzer program
    Log file analyzer site url : matthias.vallentin.net/blog/2007/01/examinig-and-dissecting-tcpdump-libpcap-traces/

    Or you can use for reading and analyzin log file:
    Code:
    tcpdump -r mylogfile.pcap
    GUI version pcap log analyzer application: wiresharak
    Another console version pcap log analyzer application: tshark

    if you want to write raw log file, you use this command:
    Code:
    tcpdump  -i eth0 -n port 22 > mylogfile.txt
    You can use text editor like notepad, vi, nano, emacs

    Solution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •