<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Penguinsoft &#187; login</title>
	<atom:link href="http://penguinsoft.us/tag/login/feed/" rel="self" type="application/rss+xml" />
	<link>http://penguinsoft.us</link>
	<description>Application Development, Web Development, Innovative Software Solutions</description>
	<lastBuildDate>Mon, 12 Mar 2012 11:14:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bad SSH Logins</title>
		<link>http://penguinsoft.us/2010/07/bad-ssh-logins/</link>
		<comments>http://penguinsoft.us/2010/07/bad-ssh-logins/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 02:33:00 +0000</pubDate>
		<dc:creator>Kenneth</dc:creator>
				<category><![CDATA[Code and Servers]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[bad]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[mc]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://penguinsoft.us/?p=403</guid>
		<description><![CDATA[On a linux machine all the failed ssh logins go to a log file in /var/log/btmp. So the question being, How do we see this information in a nice understandable format. We could just use the cat utility like so <code>cat /var/log/btmp</code>. After 10 minutes]]></description>
			<content:encoded><![CDATA[<p>On a linux machine all the failed ssh logins go to a log file <span id="more-403"></span>in /var/log/btmp. So the question being, How do we see this information in a nice understandable format. We could just use the cat utility like so <code>cat /var/log/btmp</code>. After 10 minutes of your linux box spewing out a bunch of junk to your terminal you&#8217;ll understand why this is a bad thing. There is a utility called <code>last</code> it is used to see the people who were last logged in. Type <code>last -10</code>. The output is useful but it isn&#8217;t useful for our purposes. We want to see the bad logins not the good logins. It just so happens the <code>last</code> utility accepts a filename parameter. Type <code>last -10 -f /var/log/btmp</code>. Voila! This is exactly what we want to see. You can change the -10 to any number you want and it will show you that number of bad logins. Let&#8217;s put this into an alias in our bash profile. You need to navigate to your bash profile, mine is in /root/.bash_profile. Use a text editor like <code>vi</code> or my favorite <code>mc</code>. Add the following line to the script <code>alias bad='last -10 -f /var/log/btmp</code>. Save it, log out and log back in. Now you can just type <code>bad</code> and it will output what you want! Please leave a comment if this helped you, or if you have a better way of doing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinsoft.us/2010/07/bad-ssh-logins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

