{"id":950,"date":"2012-08-03T09:50:15","date_gmt":"2012-08-03T01:50:15","guid":{"rendered":"http:\/\/rmohan.com\/?p=950"},"modified":"2012-08-03T09:50:15","modified_gmt":"2012-08-03T01:50:15","slug":"log-all-activity","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=950","title":{"rendered":"Log all activity"},"content":{"rendered":"<div>\n<p>I log sshd session in a file called \/var\/log\/sshd.log and here\u2019s how I do<br \/>\nit:<br \/>\n1. touch \/var\/log\/sshd.log<\/p>\n<p>2. edit your \/etc\/syslog.conf and add the lines<br \/>\n!sshd<br \/>\n*.* \/var\/log\/sshd.log<\/p>\n<p>3. killall -HUP syslogd<\/p>\n<p>The sshd will now log stuff into \/var\/log\/sshd.log. Edit your<br \/>\n\/etc\/ssh\/sshd_config file to determine what gets logged. By default, the following lines are in sshd_config for sylog logging:<\/p>\n<p>SyslogFacility AUTH<br \/>\nLogLevel INFO<\/p>\n<p>Change as necessary, more details are in the sshd manpage.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\n<p>I log sshd session in a file called \/var\/log\/sshd.log and here\u2019s how I do it: 1. touch \/var\/log\/sshd.log<\/p>\n<p>2. edit your \/etc\/syslog.conf and add the lines !sshd *.* \/var\/log\/sshd.log<\/p>\n<p>3. killall -HUP syslogd<\/p>\n<p>The sshd will now log stuff into \/var\/log\/sshd.log. Edit your \/etc\/ssh\/sshd_config file to determine what gets logged. By default, the following [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/950"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=950"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/950\/revisions"}],"predecessor-version":[{"id":951,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/950\/revisions\/951"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}