LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Logging SSH Connections with openSSH (https://www.linuxquestions.org/questions/linux-server-73/logging-ssh-connections-with-openssh-494467/)

alfredofernandeza 10-21-2006 06:15 PM

Logging SSH Connections with openSSH
 
Hello,

I have installed a SSH server in a Fedora Core 5 computer. The system will be used by several users using their respective usernames and passwords. I was wondering if the system stores by itself a log of successful and attempted connections and where it is. I would also like to know a way of knowing the current state of the system, for instance knowing who is connected at any given time. I tried to use the who command but I made some tests and it doesn't seem to do what I want it to do, the who command didn't always display all of the remotely connected users. If the system doesn't do all this logging, is there any application that might work for me? Btw, the system is to be used primarily to download files though SCP.

Does anyone have any ideas?

Thank you,
Alfredo

Jerre Cope 10-22-2006 12:46 AM

The /var/log/messages file should show you what you want to see.

Use tail -f /var/log/messages

and watch what happens as your users scp.

"who" will show you ssh login sessions, but not sftp and scp connections.

alfredofernandeza 10-22-2006 01:17 AM

/var/log/messages
 
Hey,

I read the /var/log/messages and didn't find any useful information. I also tried to SCP while using tail -f /var/log/messages and nothing happened.

Any ideas?

Thank you,
Alfredo

Jerre Cope 10-22-2006 09:36 PM

I don't have a FC5 box on hand. But typically sshd logs sshd activity for both public keys and interactive login. You may need to set:

SyslogFacility AUTH

in your /etc/ssh/sshd_config file.

Also, check if you have a /var/log/syslog file. FC5 may be logging ssh somewhere else.

fukawi2 11-15-2006 06:41 PM

Try /var/log/secure on RedHat / Fedora systems...


All times are GMT -5. The time now is 11:22 AM.