<?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; SSH</title>
	<atom:link href="http://www.wiredrevolution.com/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wiredrevolution.com</link>
	<description>A Bit of Linux Wisdom</description>
	<lastBuildDate>Sat, 22 May 2010 16:03:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Share a remote filesystem over SSH</title>
		<link>http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh</link>
		<comments>http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh#comments</comments>
		<pubDate>Wed, 25 Mar 2009 12:25:24 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[/etc/fstab]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[emerge]]></category>
		<category><![CDATA[fusermount]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[remote filesystem]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[shared filesystem]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSHFS]]></category>
		<category><![CDATA[sshfs-fuse]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=1028</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/sysadmin_icon.png" width="80" height="94" alt="" title="system administration" /><br/>You may already be familiar with NFS and Samba for sharing files over a network. While these are both great distributed filesystem solutions, they require extra configuration and setup overhead in order to get them to work. If you want quick and easy access to a remote filesystem then SSHFS may be your best shot.
SSHFS [...]


No related posts.]]></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>You may already be familiar with <strong>NFS</strong> and <strong>Samba</strong> for sharing files over a network. While these are both great distributed filesystem solutions, they require extra configuration and setup overhead in order to get them to work. If you want quick and easy access to a remote filesystem then <strong>SSHFS</strong> may be your best shot.</p>
<p>SSHFS (Secure SHell FileSystem) is a file system for Linux capable of operating on files on a remote computer using just a secure shell login. It is based on sftp (SSH File Transfer Protocol).  Setup is easy on the server side, since most servers support SSH out of the box there is nothing to do.  On the client side, mounting the filesystem is as easy as logging in with SSH. The end user can seamlessly and securely interact with remote files as if they were local to your machine.</p>
<p><strong>Advantages of SSHFS over NFS/Samba</strong>:</p>
<ul>
<li>Utilizes SSH and is therefore very secure.</li>
<li>Allows secure access to remote filesystems outside of your local network.</li>
<li>Requires no special configuration on the server side.</li>
</ul>
<p><strong>Disadvantages</strong>:</p>
<ul>
<li>Slightly slower, although the difference is fairly small.</li>
<li>Does not show filesystem usage statistics.</li>
<li>Requires a user account on the server side.</li>
<li>Not a true distributed file system, single point to point sharing.</li>
</ul>
<p>
<h3>Setup</h3>
<p></p>
<p>The first step is to install SSHFS.</p>
<p>In Ubuntu:</p>
<pre>
$ sudo apt-get install sshfs
</pre>
<p>or in Gentoo:</p>
<pre>
$ sudo emerge -av sshfs-fuse
</pre>
<p>Create the mount point on your local machine. This is where you are going to access the remote filesystem.</p>
<pre>
$ sudo mkdir /mnt/share
</pre>
<p>Your user must have permission to access this mountpoint.</p>
<pre>
$ sudo chown ryan /mnt/share
</pre>
<p>
<h3>Start Sharing</h3>
<p></p>
<p>Now use the sshfs command to mount the remote filesystem. If the username is different on the server you are connecting, use the &#8220;username@host:&#8221; format, otherwise you can simply specify &#8220;host:&#8221;. </p>
<pre>
$ sshfs ryan@fileserver:/remote/share /mnt/share
</pre>
<p>If you are not using keys with SSH you will be prompted for a password.</p>
<pre>
ryan@fileserver's password:
</pre>
<p>Once you are finished you can easily unmount the filesystem.</p>
<p>as regular user:</p>
<pre>
$ fusermount -u /mnt/share
</pre>
<p>or as root:</p>
<pre>
$ sudo umount /mnt/share
</pre>
<p>
<h3>Configuration</h3>
<p></p>
<p>You can add an entry for this share to <strong>/etc/fstab</strong> to make the mounting process more seamless.</p>
<pre>
sshfs#ryan@fileserver:/remote/share /mnt/share fuse user,noauto 0 0
</pre>
<p><strong>user</strong> &#8211; allow any user to mount this share.<br />
<strong>noauto</strong> &#8211; stop the shared directory from being automatically mounted at startup. </p>
<p>If you want it automatically mounted, ensure that your SSH configuration uses keys and not passwords so it doesn&#8217;t ask for a password at startup. Once keys are in use you can safely remove the noauto option.</p>
<p>With fstab updated you can now mount the share as a normal user with this simple mount command. Again, if ssh is configured to use passwords you will still be prompted for one.</p>
<pre>
$ mount /mnt/share
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh/feed</wfw:commentRss>
		<slash:comments>0</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</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 [...]


No related posts.]]></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>No related posts.</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>
		<item>
		<title>How to SSH into Ubuntu LiveCD</title>
		<link>http://www.wiredrevolution.com/ubuntu/how-to-ssh-into-ubuntu-livecd</link>
		<comments>http://www.wiredrevolution.com/ubuntu/how-to-ssh-into-ubuntu-livecd#comments</comments>
		<pubDate>Tue, 16 Dec 2008 14:08:44 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[8.10]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[inet addr]]></category>
		<category><![CDATA[intrepid]]></category>
		<category><![CDATA[IP address]]></category>
		<category><![CDATA[livecd]]></category>
		<category><![CDATA[openssh_server]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=865</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/ubuntu_icon.png" width="80" height="78" alt="" title="ubuntu" /><br/>The ability to remotely SSH into a machine running an Ubuntu LiveCD can come in handy in many situations. The LiveCD supports a large variety of hardware and can be used to troubleshoot system problems on a machine where you have limited or no access. A user with limited skills can easily setup remote access [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/ubuntu/installing-ubuntu-910-on-the-dell-zino-hd' rel='bookmark' title='Permanent Link: Installing Ubuntu 9.10 on the Dell Zino HD'>Installing Ubuntu 9.10 on the Dell Zino HD</a> <small>The Dell Inspiron Zino HD is the perfect machine if...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/ubuntu_icon.png" width="80" height="78" alt="" title="ubuntu" /><br/><p>The ability to remotely <strong>SSH</strong> into a machine running an <strong>Ubuntu</strong> <strong>LiveCD</strong> can come in handy in many situations. The LiveCD supports a large variety of hardware and can be used to troubleshoot system problems on a machine where you have limited or no access. A user with limited skills can easily setup remote access and allow a trusted friend to troubleshoot the system from another location.</p>
<p>The first thing to start the process is to open a <strong>terminal</strong>. Follow these menus:</p>
<p><strong>Applications -> Accessories -> Terminal</strong></p>
<p>In the terminal install the <strong>ssh server</strong> on your LiveCD system.</p>
<pre>
$ sudo apt-get install openssh-server
</pre>
<p>The server is started automatically after installing. </p>
<p>To login remotely, you’ll need to set the password for the default ubuntu user.</p>
<pre>
$ sudo passwd ubuntu
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
</pre>
<p>You should now be able to login to the system running the LiveCD. But first you need to <a href="/system-administration/find-your-ip-address-with-ifconfig">find the IP address</a> of the machine so you can connect to it.</p>
<p>The <strong>ifconfig</strong> command will list your network interfaces and along with it your IP address.</p>
<pre>
$ ifconfig
</pre>
<pre>
eth0      ...
          <strong>inet addr:192.168.1.1</strong>  Bcast:192.168.2.255  Mask:255.255.255.0
          ...
</pre>
<p>The <strong>inet addr</strong> entry is your IP address which you need to log into the LiveCD system. As you an see above the IP address begins with &#8220;<strong>192.168</strong>&#8221; which indicates that the IP address is only valid on the local network. It was an address assigned to the machine by the router.  This is fine if you plan on logging in from another machine on this local network.</p>
<p>If you need to access the machine from outside your local network you have a couple of options.  The first is to remove any router between you and the Internet. This should give you a valid IP address which is accessible from outside your local network. You may also be able to access your router&#8217;s administration panel and tell it to pass SSH traffic to the IP address of the LiveCD system.  You will then use the router&#8217;s IP address instead for the next step.</p>
<p>If your IP address already begins with something other than &#8220;<strong>192.168</strong>&#8221; then you are safe as well. You should be able to access the LiveCD system from any location, local or not.</p>
<p>Using the IP address from the previous step you can now log into the LiveCD system as the ubuntu user. Use the password you created earler.</p>
<pre>
$ ssh ubuntu@&lt;IP Address&gt;
</pre>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/ubuntu/installing-ubuntu-910-on-the-dell-zino-hd' rel='bookmark' title='Permanent Link: Installing Ubuntu 9.10 on the Dell Zino HD'>Installing Ubuntu 9.10 on the Dell Zino HD</a> <small>The Dell Inspiron Zino HD is the perfect machine if...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/ubuntu/how-to-ssh-into-ubuntu-livecd/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to X session forwarding over SSH</title>
		<link>http://www.wiredrevolution.com/system-administration/how-to-x-session-forwarding-over-ssh</link>
		<comments>http://www.wiredrevolution.com/system-administration/how-to-x-session-forwarding-over-ssh#comments</comments>
		<pubDate>Thu, 04 Dec 2008 14:05:41 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[/etc/ssh/ssh_config]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[forwarding]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[tunneling]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=807</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/sysadmin_icon.png" width="80" height="94" alt="" title="system administration" /><br/>SSH allows secure (encrypted and authenticated) connections between two hosts.  These connections include terminal sessions, file transfers, TCP port forwarding, as well as X window forwarding which I will be covering here. X forwarding is a form of tunneling that allows you to run a GUI application on a remote machine but let you [...]


No related posts.]]></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><strong>SSH</strong> allows secure (encrypted and authenticated) connections between two hosts.  These connections include terminal sessions, file transfers, TCP port forwarding, as well as X window forwarding which I will be covering here. X forwarding is a form of tunneling that allows you to run a GUI application on a remote machine but let you view and interact with it on your local machine.</p>
<p>To try this out you will need both <strong>X</strong> and <strong>SSH</strong> installed on your local and remote machines.  Make sure that you are able to log into the the remote machine over SSH before you continue.</p>
<p>Simple SSH command, ensure that this works before continuing.  You may have to enter a password for the user before it will allow you access.</p>
<pre>
$ ssh user@remotehost
</pre>
<p>The next step is to add the <strong>&#8216;-X</strong>&#8216; option.  This will turn on X forwarding and allow you to remotely run X programs. In this case we will run xclock.</p>
<pre>
$ ssh -X user@remotehost xclock
</pre>
<p>You should see the xclock window appear on your screen. You can interact with it like any other local application window. Close it when you are done.</p>
<p>If you have a slower connection you can turn on compression by adding the &#8216;<strong>-C</strong>&#8216; option to the command above. This will compress all data communications with the gzip algorithm.</p>
<pre>
$ ssh -C -X user@remotehost xclock
</pre>
<p>If you are experiencing any problems turn on verbose output with the &#8216;<strong>-v</strong>&#8216; option. This will give you a lot more output and tell you what is going on underneath.</p>
<pre>
$ ssh -v -X user@remotehost xclock
</pre>
<p>If you are still having issues look in the ssh configuration file here<strong>/etc/ssh/ssh_config</strong>, and make sure that you don&#8217;t have X forwarding settings disabled.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/system-administration/how-to-x-session-forwarding-over-ssh/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Securely copy remote files with scp</title>
		<link>http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp</link>
		<comments>http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp#comments</comments>
		<pubDate>Sat, 27 Sep 2008 17:27:30 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[commands]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=114</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/commands_icon.png" width="80" height="69" alt="" title="commands" /><br/>scp allows you to securely copy files locally or remotely across a network. It uses SSH for data transfer and uses the same authentication. If you do not have public key authentication enabled you will be prompted for a password.
This basic format for scp is this.

scp [options] [[user@]src_host1:]file1 [[user@]dest_host2:]file2

Assuming the remotehost has a username which [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/commands_icon.png" width="80" height="69" alt="" title="commands" /><br/><p><strong>scp</strong> allows you to securely copy files locally or remotely across a network. It uses <strong>SSH</strong> for data transfer and uses the same authentication. If you do not have public key authentication enabled you will be prompted for a password.</p>
<p>This basic format for scp is this.</p>
<pre>
scp [options] [[user@]src_host1:]file1 [[user@]dest_host2:]file2
</pre>
<p>Assuming the remotehost has a username which matches username on the local host, this command will copy a a local file into the /tmp directory on remotehost. Notice that the colon separates the host from the location.</p>
<pre>
$ scp file.txt remotehost:/tmp/
</pre>
<p>You will be presented with the real-time statistics about the file transfer.</p>
<pre>
$ scp file.txt remotehost:/tmp/
</pre>
<pre>
file.txt                                      100%   22KB  21.9KB/s   00:00
</pre>
<p>This command is similar but the period instructs the file to be placed in the users home directory.</p>
<pre>
$ scp file.txt remotehost:.
</pre>
<p>You can specify another user and login using their username.  This will copy the file to ryan&#8217;s home directory.</p>
<pre>
$ scp file.txt ryan@remotehost:.
</pre>
<p>Alternatively you can copy a remote file to your local host. The period in the destination path refers to the current working directory in this case.</p>
<pre>
$ scp ryan@remotehost:file.txt .
</pre>
<p>Likewise, you can copy to any other local path you have access, such as the /tmp directory.</p>
<pre>
$ scp ryan@remotehost:file.txt /tmp/
</pre>
<p>Copying directories is similar except that the &#8216;-r&#8217; option is required. This command will copy a directory from the current working directory to the users home directory on remotehost.</p>
<pre>
$ scp -r mydir/ remotehost:.
</pre>
<p>You can even copy from one remote host to another.</p>
<pre>
$ scp remotehost1:file.txt remotehost2:file.txt
</pre>
<p>Use the -p option to preserve modification times, access times, and modes from the original file.</p>
<pre>
$ scp -p remotehost1:/tmp/file.txt remotehost2:/tmp/file.txt
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
