ssh有关的,lastb记录域名不全的问题
时间:2009-05-19
来源:互联网
安全版块没有人管,无耐发个重复贴吧
像后面的host252.b1.nw.co ,很明显就是记录的不全的域名
如果让它只记录IP地址,以便做进一步的处理?
代码:
root@www:/var/log# lastb | more id ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) login ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) download ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) project ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) email ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) contact ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) database ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) data ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) educatio ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) post ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) forum ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) happy ssh:notty vserver1673.vser Sat May 16 00:37 - 00:37 (00:00) root ssh:notty 85.17.36.42 Fri May 15 12:17 - 12:17 (00:00) root ssh:notty 85.17.36.42 Fri May 15 11:15 - 11:15 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00) root ssh:notty host252.b1.nw.co Fri May 15 10:45 - 10:45 (00:00)
如果让它只记录IP地址,以便做进一步的处理?
作者: 心之语 发布时间: 2009-05-19
OPTIONS
-num This is a count telling last how many lines to show.
-n num The same.
-t YYYYMMDDHHMMSS
Display the state of logins as of the specified time. This is useful, e.g., to determine easily who was logged in at a particular time -- specify
that time with -t and look for "still logged in".
-R Suppresses the display of the hostname field.
-a Display the hostname in the last column. Useful in combination with the next flag.
-d For non-local logins, Linux stores not only the host name of the remote host but its IP number as well. This option translates the IP number back
into a hostname.
-i This option is like -d in that it displays the IP number of the remote host, but it displays the IP number in numbers-and-dots notation.
-o Read an old-type wtmp file (written by linux-libc5 applications).
-x Display the system shutdown entries and run level changes.
man lastb,上面参数应该的有帮助,试试lastb -a
-num This is a count telling last how many lines to show.
-n num The same.
-t YYYYMMDDHHMMSS
Display the state of logins as of the specified time. This is useful, e.g., to determine easily who was logged in at a particular time -- specify
that time with -t and look for "still logged in".
-R Suppresses the display of the hostname field.
-a Display the hostname in the last column. Useful in combination with the next flag.
-d For non-local logins, Linux stores not only the host name of the remote host but its IP number as well. This option translates the IP number back
into a hostname.
-i This option is like -d in that it displays the IP number of the remote host, but it displays the IP number in numbers-and-dots notation.
-o Read an old-type wtmp file (written by linux-libc5 applications).
-x Display the system shutdown entries and run level changes.
man lastb,上面参数应该的有帮助,试试lastb -a
作者: slackcode 发布时间: 2009-05-19
谢谢!
那能否让它只记录IP地址呢?
那能否让它只记录IP地址呢?
作者: 心之语 发布时间: 2009-05-20
引用:
作者: 心之语
谢谢!
那能否让它只记录IP地址呢? |
作者: slackcode 发布时间: 2009-05-21
非常感谢:)
作者: 心之语 发布时间: 2009-05-21
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28