Results 1 to 10 of 10
-
07-11-2009, 06:01 PM #1Disabled
- Join Date
- May 2009
- Location
- US
- Posts
- 2,503
Clear last login IP in ssh and "last" command
Hello,
How can I clear the last login IP address in SSH, when you login it'll say Last login from: xx.xxx.xxx.xx and etc..
Also when you use the "last" command.
How can you clear these?
I am creating an OS template for my VPS nodes and thought it'd be better to clear these before proceeding to make them.
I appreciate any help.
Thank you!
-
07-11-2009, 06:27 PM #2Disabled
- Join Date
- May 2009
- Location
- US
- Posts
- 2,503
Hello,
Never mind, I figured it out.
For anyone who wants to know how to do this, execute this command in root SSH: rm -rf /var/log/wtmp
Thank you,
~ Adam
-
07-11-2009, 07:08 PM #3Newbie
- Join Date
- Oct 2004
- Location
- egypt
- Posts
- 12
thanks for this info
-
07-12-2009, 04:22 AM #4Disabled
- Join Date
- May 2009
- Location
- US
- Posts
- 2,503
-
07-12-2009, 05:05 AM #5Junior Guru Wannabe
- Join Date
- Apr 2004
- Location
- Germany
- Posts
- 37
/var/log/lastlog, too, if it exists.
You may also want to get rid off /var/log/auth.log, and possibly off all the logs in general, if the intention is to remove any usage patterns. In the latter case, also look at /var/spool and /var/lib
-
07-12-2009, 09:15 AM #6Junior Guru Wannabe
- Join Date
- May 2009
- Posts
- 31
ya../var/log/lastlog may some time have the logs in it. Anyway thanks for the info mnaumann
-
07-12-2009, 12:31 PM #7Junior Guru Wannabe
- Join Date
- May 2009
- Location
- Kansas City
- Posts
- 62
You might want to consider this command instead of removing the entire file:
> /var/log/wtmp
-
07-12-2009, 12:36 PM #8Disabled
- Join Date
- Mar 2008
- Posts
- 630
Yeah I agree with team-vps. Blanking a file is always better than removing it completely:
cat /dev/null > /var/log/wtmp
-
07-12-2009, 01:33 PM #9Web Hosting Master
- Join Date
- Apr 2009
- Posts
- 865
/var/log/messages can also contain logs of success ssh sessions so it is good to review them too.
-
07-13-2009, 04:48 AM #10Aspiring Evangelist
- Join Date
- Sep 2007
- Posts
- 369
and also do
# history -c [ clear your all commandshistory whatever you type otherwise person will get from history whatever you did]
Thanks,
Noman
Similar Threads
-
How efficient are topic titles like "BLOWOUT", "SPECIAL" and "KILLER OFFER"?
By tinuzzo in forum Running a Web Hosting BusinessReplies: 18Last Post: 06-30-2009, 11:21 AM -
How to show matching files in lower or UPPERcase with "ls" command?
By mrzippy in forum Hosting Security and TechnologyReplies: 2Last Post: 03-27-2009, 03:50 PM -
Fraudulent "Provider" STAY CLEAR!!
By TweakAdmin in forum Dedicated ServerReplies: 43Last Post: 04-27-2007, 01:35 PM -
Shell "mkdir" and "wget"command help
By galacnet in forum Programming DiscussionReplies: 5Last Post: 01-21-2005, 03:05 PM -
"last login" in cpanel control panel always says "locla host"
By kimrari in forum Hosting Software and Control PanelsReplies: 3Last Post: 03-15-2004, 10:29 AM