<?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>gHacks technology news &#187; linux shell</title>
	<atom:link href="http://www.ghacks.net/tag/linux-shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Tue, 24 Nov 2009 15:18:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Five handy secure shell tips and tricks</title>
		<link>http://www.ghacks.net/2009/10/17/five-handy-secure-shell-tips-and-tricks/</link>
		<comments>http://www.ghacks.net/2009/10/17/five-handy-secure-shell-tips-and-tricks/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 17:47:49 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[linux shell]]></category>
		<category><![CDATA[secure shell]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=17386</guid>
		<description><![CDATA[I use secure shell a LOT, every day. So much so that I often take for granted how important this tool is. Not only does it allow me to log into remote machines to handle management of said machine, it can do other things as well &#8211; X tunneling being one of the most useful features. But [...]]]></description>
			<content:encoded><![CDATA[<p>I use secure shell a LOT, every day. So much so that I often take for granted how important this tool is. Not only does it allow me to log into remote machines to handle management of said machine, it can do other things as well &#8211; X tunneling being one of the most useful features. But for many users ssh only serves as a means to log in, do a few command-line tasks, and log out. It doesn&#8217;t (and shouldn&#8217;t) have to be that way.</p>
<p>With Secure Shell there are a number of ways to use (and configure) this tool to make it more useful and more secure. In this article  you will learn five different (and handy) secure shell tips to make sure your ssh usage is as good as it can be. And for some basic secure shell knowledge, check out my article &#8220;<a title="Get to know Linux: Secure Shell" href="http://www.ghacks.net/2009/02/17/get-to-know-linux-secure-shell/" target="_blank">Get to know Linux: Secure shell</a>&#8220;.</p>
<p><span id="more-17386"></span><strong>Password-less logon</strong></p>
<p>Have have dealt with this before (as a side note), but wanted to re-iterate this process. Because I use ssh so much I get tired of having to enter passwords constantly. Now I will preface this by saying only do this on a network you trust. Yes you will be logging into ssh with a certificate, and that certificate will be on your machine, but you don&#8217;t want to employ this method on a network that can not be trusted. With that in mind, here are the steps for setting this up.</p>
<p>On the local machine issue the command:</p>
<p><em>ssh-keygen -t dsa</em></p>
<p>This command will generate a public key that will be then copied to your server. During this creation process you will be asked for a password &#8211; just press enter to use a blank password for this. You will have to verify the password, so hit enter again. )</p>
<p>With the key created you have to copy it to the server you want to ssh into. To do this enter the command:</p>
<p><em>ssh-copy-id -i .ssh/id_dsa.pub username@destination</em></p>
<p>Where <em>username</em> is the username you will be logging into on the remote server and <em>destination</em> is the IP address of the remote server.</p>
<p>Now when you go to secure shell into that remote machine you will not have to enter a password.</p>
<p><strong>Block root login</strong></p>
<p>Although secure shell is a secure means of logging into your server, you do not want to allow root access (for obvious reasons). Blocking root access is simple. Open up the <strong>/etc/ssh/sshd_config</strong> file and look for this line:</p>
<p><em>PermitRootLogin</em></p>
<p>and make sure it is set to &#8220;no&#8221; (no quotes). So the complete line will read:</p>
<p><em>PermitRootLogin no</em></p>
<p>Once you have saved that file, restart the ssh daemon with the command:</p>
<p><em>sudo /etc/init.d/ssh restart</em></p>
<p>Now the root user can no longer log in remotely via ssh.</p>
<p><strong>Enable X tunneling</strong></p>
<p>Secure shell is made even more powerful when you can run a remote X application on your local machine. And what is better is that it&#8217;s not difficult at all. In order to allow X tunneling you will first need to open up the <strong>/etc/ssh/sshd_config </strong>file and search for this line:</p>
<p><em>X11Forwarding</em></p>
<p>and make sure it looks like:</p>
<p><em>X11Forwarding yes</em></p>
<p>Once that is set save the file, restart sshd, and you are ready to tunnel and X Windows application through ssh. To accomplish this you have to add the <em>-X </em>flag to your secure shell command like this:</p>
<p><em>ssh -v -l USERNAME IP_ADDRESS -X</em></p>
<p>Where USERNAME is the username you want to log in with and IP_ADDRESS is the actual IP address of the machine you are logging into.</p>
<p><strong>Final thoughts</strong></p>
<p>There are so many cool tricks and tips with secure shell, but the above three are, in my opinion, the most helpful. Have you come across a helpful ssh tip you&#8217;d like to share? Or are you looking for a particular behavior out of secure shell? If so. share with your fellow Ghacks readers.</p>

	Tags: <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/linux-shell/" title="linux shell" rel="tag">linux shell</a>, <a href="http://www.ghacks.net/tag/secure-shell/" title="secure shell" rel="tag">secure shell</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/18/linux-command-line-fu/" title="Linux Command Line Fu (February 18, 2009)">Linux Command Line Fu</a> (5)</li>
	<li><a href="http://www.ghacks.net/2009/02/17/get-to-know-linux-secure-shell/" title="Get To Know Linux: Secure Shell (February 17, 2009)">Get To Know Linux: Secure Shell</a> (4)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
	<li><a href="http://www.ghacks.net/2006/12/07/widgets-for-linux-superkaramba/" title="Widgets for Linux: SuperKaramba (December 7, 2006)">Widgets for Linux: SuperKaramba</a> (6)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/10/17/five-handy-secure-shell-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Linux Command Line Fu</title>
		<link>http://www.ghacks.net/2009/02/18/linux-command-line-fu/</link>
		<comments>http://www.ghacks.net/2009/02/18/linux-command-line-fu/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 09:37:30 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[command line fu]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[linux command]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[linux shell]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=10642</guid>
		<description><![CDATA[While most Linux operating systems come with their graphical user interface it sometimes is still important to work from the command line, especially if that is the only way to access a Linux server. Linux Command Line Fu is a Digg-like website that lives of its user contributions. Users can submit and vote for Linux [...]]]></description>
			<content:encoded><![CDATA[<p>While most Linux operating systems come with their graphical user interface it sometimes is still important to work from the command line, especially if that is the only way to access a Linux server. Linux <a href="http://www.commandlinefu.com/commands/browse/sort-by-votes">Command Line Fu</a> is a Digg-like website that lives of its user contributions. Users can submit and vote for Linux command line gems.</p>
<p>Each submitted Linux command &#8211; to be honest there are a few command submissions for other operating systems but the majority is pure Linux &#8211; lists the command itself and a description provided by the author of the command. There will also be information about the author, the date the Linux command has been submitted and the amount of votes that it received.</p>
<p>Logged in users can vote, leave comments or report a command as malicious. Command-Line Fu can be accessed with an Open ID.</p>
<p><span id="more-10642"></span><a href="http://www.ghacks.net/wp-content/uploads/2009/02/linux_command.jpg"><img src="http://www.ghacks.net/wp-content/uploads/2009/02/linux_command-499x200.jpg" alt="linux command" title="linux command" width="499" height="200" class="alignnone size-medium wp-image-10643" /></a></p>
<p>The site features a search engine and will also post new commands submitted to the site to a Twitter account. The site would do good to provide a list of all available commands to print it or save it in a text document format. It is still a very interesting resource for Linux users who work with the Linux command line regularly.</p>

	Tags: <a href="http://www.ghacks.net/tag/command-line-fu/" title="command line fu" rel="tag">command line fu</a>, <a href="http://www.ghacks.net/tag/command-line/" title="command-line" rel="tag">command-line</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/linux-command/" title="linux command" rel="tag">linux command</a>, <a href="http://www.ghacks.net/tag/linux-commands/" title="linux commands" rel="tag">linux commands</a>, <a href="http://www.ghacks.net/tag/linux-shell/" title="linux shell" rel="tag">linux shell</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/13/searching-for-files-in-linux-via-command-line/" title="Searching for Files in Linux via Command Line (February 13, 2009)">Searching for Files in Linux via Command Line</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/02/06/get-to-know-linux-gnome-terminal/" title="Get To Know Linux: gnome-terminal (February 6, 2009)">Get To Know Linux: gnome-terminal</a> (5)</li>
	<li><a href="http://www.ghacks.net/2009/10/17/five-handy-secure-shell-tips-and-tricks/" title="Five handy secure shell tips and tricks (October 17, 2009)">Five handy secure shell tips and tricks</a> (8)</li>
	<li><a href="http://www.ghacks.net/2009/01/27/burn-cds-from-command-line/" title="Burn CDs From Command Line (January 27, 2009)">Burn CDs From Command Line</a> (4)</li>
	<li><a href="http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/" title="YubNub a social internet command line (January 16, 2007)">YubNub a social internet command line</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/02/18/linux-command-line-fu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
