FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    sforget Guest

    Logging SSH connections

    I have noticed that the system log only records failed log-in attempts through SSH.

    While still providing useful information, I would rather log ALL attempts at logging in through SSH, successful or otherwise. This way I can determin how secure my server is by also paying attention to who does successfully log in.

    Any ideas how I might go about doing this?

  2. #2
    yanik Guest
    where are you looking?

  3. #3
    yanik Guest
    look at /var/log/secure

  4. #4
    Join Date
    Feb 2005
    Location
    ark n saw out in the sticks
    Posts
    2,316
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    edit /etc/ssh/shhd_config and in the "logging" section--
    uncomment the #LogLevel INFO line

  5. #5
    Join Date
    Jun 2005
    Location
    Bay Area, California
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sforget
    I have noticed that the system log only records failed log-in attempts through SSH.

    While still providing useful information, I would rather log ALL attempts at logging in through SSH, successful or otherwise. This way I can determin how secure my server is by also paying attention to who does successfully log in.

    Any ideas how I might go about doing this?

    You can also use the 'last' command--that will show you all logins--example:

    apollo[root]:/root-> last
    root pts/4 209.57.192.100 Thu Jun 23 15:28 still logged in
    root pts/3 192.168.100.11 Thu Jun 23 12:47 still logged in
    root pts/3 192.168.100.11 Wed Jun 22 23:17 - 02:23 (03:05)
    root pts/3 192.168.100.11 Wed Jun 22 22:21 - 22:52 (00:30)
    root pts/5 209.57.192.100 Wed Jun 22 13:59 - 22:22 (08:23)
    root pts/5 209.57.192.100 Wed Jun 22 13:38 - 13:58 (00:19)
    root pts/3 192.168.100.11 Wed Jun 22 01:34 - 14:06 (12:31)

    Also, the /var/log/messages file shows you all attempts, failed or succesful:

    Jun 23 14:03:12 apollo sshd(pam_unix)[5487]: check pass; user unknown
    Jun 23 14:03:12 apollo sshd(pam_unix)[5487]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=80.51.253.38
    Jun 23 14:03:17 apollo sshd(pam_unix)[5489]: check pass; user unknown
    Jun 23 14:03:17 apollo sshd(pam_unix)[5489]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=80.51.253.38
    Jun 23 15:28:40 apollo sshd(pam_unix)[6183]: session opened for user root by root(uid=0)

    (looks like I already have someone trying to crack my new install of fc4--sheesh)

    Finally, if you are running logwatch, which runs by default in fc4, you should have these messages in roots mailbox daily:

    U 4 root@localhost.local Sun Jun 19 04:02 176/6410 "LogWatch for apollo"

    contents:

    sshd:
    Authentication Failures:
    root (192.168.100.11): 2 Time(s)
    Sessions Opened:
    root by root: 4 Time(s)

  6. #6
    sforget Guest
    Quote Originally Posted by w5set
    edit /etc/ssh/shhd_config and in the "logging" section--
    uncomment the #LogLevel INFO line

    Thank-you. Thats works exactly as I need

Similar Threads

  1. 2 connections, 1 NIC
    By nspmangalore in forum Servers & Networking
    Replies: 2
    Last Post: 23rd August 2007, 03:03 PM
  2. 2 connections, 1 NIC
    By nspmangalore in forum Using Fedora
    Replies: 1
    Last Post: 22nd August 2007, 10:03 AM
  3. Help with my connections.
    By Allieonfire in forum Using Fedora
    Replies: 1
    Last Post: 3rd July 2006, 06:35 AM
  4. FC4 stop logging after Webmin installed ( bandwidth logging )
    By simonxyz in forum EOL (End Of Life) Versions
    Replies: 0
    Last Post: 15th November 2005, 11:48 AM
  5. VPN Connections.
    By Jeffa in forum Using Fedora
    Replies: 3
    Last Post: 17th October 2004, 04:31 AM

Tags for this Thread

Posting Permissions

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