LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1417|回复: 7

如何看通过ssh连接上来的用户log?

[复制链接]
发表于 2003-8-3 00:48:27 | 显示全部楼层 |阅读模式
我想看系统log里记录ssh的联接的部分,但是不知道在那里可以看到详细记录那个用户什么时间连上来的记录呢?
发表于 2003-8-3 07:45:28 | 显示全部楼层
last
发表于 2003-8-3 11:17:49 | 显示全部楼层
/var/log/secure

在/etc/syslog.conf中有定义
 楼主| 发表于 2003-8-3 13:15:01 | 显示全部楼层
我的syslog.conf如下,但好像看不到有关ssh的部分。
[root@nms etc]# more syslog.conf
# Various entry
auth,authpriv.*                                                 /var/log/auth.log
*.*;auth,authpriv.none                                          -/var/log/syslog
user.*                                                          -/var/log/user.log

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;;news.none;authpriv.none                                       -/var/log/messages

# The authpriv file has restricted access.
authpriv.*                                                      /var/log/secure

# Mail logging
mail.=debug;mail.=info;mail.=notice                             -/var/log/mail/info
mail.=warn                                                      -/var/log/mail/warnings
mail.err                                                        -/var/log/mail/errors

# Cron logging
cron.=debug;cron.=info;cron.=notice                             -/var/log/cron/info
cron.=warn                                                      -/var/log/cron/warnings
cron.err                                                        -/var/log/cron/errors

# Kernel logging
kern.=debug;kern.=info;kern.=notice                             -/var/log/kernel/info
kern.=warn                                                      -/var/log/kernel/warnings
kern.err                                                        /var/log/kernel/errors

# Lpr logging
lpr.=debug;lpr.=info;lpr.=notice                                -/var/log/lpr/info
lpr.=warn                                                       -/var/log/lpr/warnings
lpr.err                                                         -/var/log/lpr/errors

# News logging
news.=debug;news.=info;news.=notice                             -/var/log/news/news.notice
news.=crit                                                      -/var/log/news/news.crit
news.=err                                                       -/var/log/news/news.err

# Daemons logging
daemon.=debug;daemon.=info;daemon.=notice                       -/var/log/daemons/info
daemon.=warn                                                    -/var/log/daemons/warnings
daemon.err                                                      -/var/log/daemons/errors


# Everybody gets emergency messages
*.emerg                                                         *

# Save mail and news errors of level err and higher in a
# special file.
uucp,news.crit                                                  -/var/log/spooler

# Save boot messages also to boot.log
local7.*                                                        -/var/log/boot.log

# Explanations from Mandrake Linux configuration tools
local1.*                                                        -/var/log/explanations
发表于 2003-8-4 14:12:29 | 显示全部楼层

应该有的

auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
user.* -/var/log/user.log

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;;news.none;authpriv.none -/var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

----------------------------------------------------
就在/var/log/secure 中
在/var/log/auth.log也有

grep "ssh" /var/log/secure
grep "ssh" /var/log/auth.log

还没有,看看sshd是不是用了quiet模式
 楼主| 发表于 2003-8-4 16:11:28 | 显示全部楼层
收到,谢谢。另外,如何在字符界面下kick掉一个之前telnet上来的用户呢?
发表于 2003-8-4 22:34:42 | 显示全部楼层

我不知道正统的方法

不过有个办法你可以一试,
kill那个用户对应的telnetd/sshd
用ps -ef一看你就明白了。
 楼主| 发表于 2003-8-5 11:14:57 | 显示全部楼层

回复: 我不知道正统的方法

最初由 gurulite 发表
不过有个办法你可以一试,
kill那个用户对应的telnetd/sshd
用ps -ef一看你就明白了。

谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表