<?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; sshd</title>
	<atom:link href="http://www.wiredrevolution.com/tag/sshd/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 SSH access between VirtualBox Host and Guest VMs</title>
		<link>http://www.wiredrevolution.com/virtualbox/setup-ssh-access-between-virtualbox-host-and-guest-vms?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setup-ssh-access-between-virtualbox-host-and-guest-vms</link>
		<comments>http://www.wiredrevolution.com/virtualbox/setup-ssh-access-between-virtualbox-host-and-guest-vms#comments</comments>
		<pubDate>Fri, 10 Sep 2010 16:50:39 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[/etc/hosts]]></category>
		<category><![CDATA[/etc/network/interfaces]]></category>
		<category><![CDATA[/etc/sysconfig/network-scripts/ifcfg-eth1]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[eth1]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[Host-only Adapter]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[sshd]]></category>
		<category><![CDATA[static IP]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[VM]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=1257</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/virtualbox-icon.png" width="91" height="100" alt="" title="virtualbox" /><br/>It is often necessary to have the ability to SSH between your Linux Host and your Guest virtual machines. In VirtualBox you can do this by simply configuring a second network interface on the Guest. This type of setup will not only allow SSH sessions between Host and Guest, but also between separate Guests themselves. [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/virtualbox/clone-a-virtualbox-guest-vm' rel='bookmark' title='Permanent Link: Clone a VirtualBox Guest VM'>Clone a VirtualBox Guest VM</a></li>
<li><a href='http://www.wiredrevolution.com/virtualbox/mount-a-virtualbox-shared-folder-inside-a-guest-vm' rel='bookmark' title='Permanent Link: Mount a VirtualBox shared folder inside a guest VM'>Mount a VirtualBox shared folder inside a guest VM</a></li>
<li><a href='http://www.wiredrevolution.com/virtualbox/setup-usb-support-in-oracle-virtualbox' rel='bookmark' title='Permanent Link: Setup USB support in Oracle VirtualBox'>Setup USB support in Oracle VirtualBox</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/virtualbox-icon.png" width="91" height="100" alt="" title="virtualbox" /><br/><p>It is often necessary to have the ability to SSH between your Linux Host and your Guest virtual machines. In VirtualBox you can do this by simply configuring a second network interface on the Guest. This type of setup will not only allow SSH sessions between Host and Guest, but also between separate Guests themselves.</p>
<p>First off shutdown your Guest VM so that you can add a second network interface. By default you should have one interface already which is using NAT. Leave this alone  as it provides access to the internet. Select the tab “Adapter 2″ and change “attached to” to “Host-only Adapter”.</p>
<p><center><a href="http://www.wiredrevolution.com/wp-content/uploads/2010/09/virtualbox_networking.png"><img src="http://www.wiredrevolution.com/wp-content/uploads/2010/09/virtualbox_networking.png" alt="" title="virtualbox_networking" width="500" height="390" class="aligncenter size-full wp-image-1258" /></a></center></p>
<p>Now boot up your Guest and pull up a terminal. Run <strong>ifconfig</strong> to see what base address eth1 has been assigned. You can use this address as a base to assign static IP addresses for each Guest VM. In this case <strong>inet addr:192.168.56.101</strong> is the base IP address.<br />
<code>$ sudo ifconfig eth1</code><br />
<code>Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX<br />
<strong>inet addr:192.168.56.101</strong>  Bcast:192.168.56.255  Mask:255.255.255.0<br />
inet6 addr: XXXX::XXXX:XXXX:XXXX:XXXX/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
RX packets:296 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:237 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:32116 (31.3 KiB)  TX bytes:37642 (36.7 KiB)<br />
</code></p>
<p>If you rely on DHCP you might get a different IP address each time your Guest VM reboots. If this is a problem, you need to setup a static IP address instead.</p>
<p>On a Debian based system edit <strong>/etc/network/interfaces</strong> to add the following lines. <strong>Change the address to your base IP address</strong>.<br />
<code>auto eth1<br />
iface eth1 inet static<br />
    address 192.168.56.101<br />
    netmask 255.255.255.0<br />
</code></p>
<p>On a redhat based system edit this file <strong>/etc/sysconfig/network-scripts/ifcfg-eth1</strong> and add the following lines. <strong>Change the IPADDR to your base IP address</strong>.<br />
<code>DEVICE=eth1<br />
BOOTPROTO=static<br />
IPADDR=192.168.56.101<br />
NETMASK=255.255.255.0<br />
</code></p>
<p>On your Linux Host you can now open a terminal add ssh to the Guest VM:<br />
<code>$ ssh ryan@192.168.56.101</code></p>
<p>If you are having problems connecting, make sure that sshd in installed and running, and that the firewall on the is not blocking the SSH service on the VM.</p>
<p>You can create an entry in <strong>/etc/hosts</strong> so you don&#8217;t have to remember the IP address.<br />
<code>192.168.56.101  virtualhost1</code></p>
<p>This allows you to use the virtual hostname instead.<br />
<code>$ ssh  ryan@virtualhost1</code></p>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/virtualbox/clone-a-virtualbox-guest-vm' rel='bookmark' title='Permanent Link: Clone a VirtualBox Guest VM'>Clone a VirtualBox Guest VM</a></li>
<li><a href='http://www.wiredrevolution.com/virtualbox/mount-a-virtualbox-shared-folder-inside-a-guest-vm' rel='bookmark' title='Permanent Link: Mount a VirtualBox shared folder inside a guest VM'>Mount a VirtualBox shared folder inside a guest VM</a></li>
<li><a href='http://www.wiredrevolution.com/virtualbox/setup-usb-support-in-oracle-virtualbox' rel='bookmark' title='Permanent Link: Setup USB support in Oracle VirtualBox'>Setup USB support in Oracle VirtualBox</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/virtualbox/setup-ssh-access-between-virtualbox-host-and-guest-vms/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<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>

