<?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>WiredRevolution.com &#187; user</title>
	<atom:link href="http://www.wiredrevolution.com/tag/user/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wiredrevolution.com</link>
	<description>A Bit of Linux Wisdom</description>
	<lastBuildDate>Wed, 18 Jan 2012 22:45:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Setup user login restrictions with SSH</title>
		<link>http://www.wiredrevolution.com/system-administration/setup-user-login-restrictions-with-ssh?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setup-user-login-restrictions-with-ssh</link>
		<comments>http://www.wiredrevolution.com/system-administration/setup-user-login-restrictions-with-ssh#comments</comments>
		<pubDate>Wed, 04 Feb 2009 15:52:57 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[/etc/ssh/sshd_config]]></category>
		<category><![CDATA[AllowUsers]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[restrict]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[sshd]]></category>
		<category><![CDATA[sshd_config]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=960</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/sysadmin_icon.png" width="80" height="94" alt="" title="system administration" /><br/>At various times it is necessary to restrict the users which can access a certain host. If your network relies on SSH it is as simple as changing an option in the sshd_config configuration file. You will of course need root access to make the necessary changes to this file and eventually reset the SSH [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp' rel='bookmark' title='Permanent Link: Securely copy remote files with scp'>Securely copy remote files with scp</a></li>
<li><a href='http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh' rel='bookmark' title='Permanent Link: Share a remote filesystem over SSH'>Share a remote filesystem over SSH</a></li>
<li><a href='http://www.wiredrevolution.com/virtualbox/setup-ssh-access-between-virtualbox-host-and-guest-vms' rel='bookmark' title='Permanent Link: Setup SSH access between VirtualBox Host and Guest VMs'>Setup SSH access between VirtualBox Host and Guest VMs</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/sysadmin_icon.png" width="80" height="94" alt="" title="system administration" /><br/><p>At various times it is necessary to restrict the users which can access a certain host. If your network relies on SSH it is as simple as changing an option in the <strong>sshd_config</strong> configuration file. You will of course need root access to make the necessary changes to this file and eventually reset the SSH daemon.</p>
<p>This configuration file is usually located here.<br />
<strong>/etc/ssh/sshd_config</strong></p>
<p>Open the file as root in order to make changes.</p>
<pre>
$ sudo vim /etc/ssh/sshd_config
</pre>
<p>You need to set the <strong>AllowUsers</strong> keyword followed by the users you want to have access to the machine.</p>
<pre>
AllowUsers	ryan joe
</pre>
<p>If you want to do something more complex here is the output from the man page:<br />
<em><br />
AllowUsers<br />
This keyword can be followed by a list of user name patterns, separated by spaces.  If specified, login is allowed only for user names that match one of the patterns.  &#8216;*&#8217; and &#8216;?&#8217; can be used as wildcards in the patterns.  Only user names are valid; a numerical user ID is not recognized.  By default, login is allowed for all users.  If the pattern takes the form USER@HOST then USER and HOST are separately checked, restricting logins to particular users from particular hosts.<br />
</em></p>
<p>Another helpful to set the <strong>PermitRootLogin</strong> to &#8216;no&#8217; so that the root account is inaccessible.</p>
<pre>
PermitRootLogin  no
</pre>
<p>When these settings have been changed go ahead and restart the SSH daemon.</p>
<pre>
$ sudo /etc/init.d/sshd restart
</pre>
<p>There are of course ways around this if other users have access to sudo or the root account. But for the most part it is a good way to restrict user access. </p>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp' rel='bookmark' title='Permanent Link: Securely copy remote files with scp'>Securely copy remote files with scp</a></li>
<li><a href='http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh' rel='bookmark' title='Permanent Link: Share a remote filesystem over SSH'>Share a remote filesystem over SSH</a></li>
<li><a href='http://www.wiredrevolution.com/virtualbox/setup-ssh-access-between-virtualbox-host-and-guest-vms' rel='bookmark' title='Permanent Link: Setup SSH access between VirtualBox Host and Guest VMs'>Setup SSH access between VirtualBox Host and Guest VMs</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/system-administration/setup-user-login-restrictions-with-ssh/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

