var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Clear last login IP in ssh and "last" command
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.
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
Glad to help.
Originally Posted by egmix
/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
ya../var/log/lastlog may some time have the logs in it. Anyway thanks for the info mnaumann
You might want to consider this command instead of removing the entire file:
Yeah I agree with team-vps. Blanking a file is always better than removing it completely:
cat /dev/null > /var/log/wtmp
/var/log/messages can also contain logs of success ssh sessions so it is good to review them too.
and also do
# history -c [ clear your all commandshistory whatever you type otherwise person will get from history whatever you did]
By BluewaveHosted in forum Running a Web Hosting Business
Last Post: 06-30-2009, 11:21 AM
By mrzippy in forum Hosting Security and Technology
Last Post: 03-27-2009, 03:50 PM
By TweakAdmin in forum Dedicated Server
Last Post: 04-27-2007, 01:35 PM
By galacnet in forum Programming Discussion
Last Post: 01-21-2005, 03:05 PM
By kimrari in forum Hosting Software and Control Panels
Last Post: 03-15-2004, 10:29 AM