<?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 &#124; Latest Tech News, Software And Tutorials &#187; secure shell</title> <atom:link href="http://www.ghacks.net/tag/secure-shell/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 10 Feb 2012 20:51:26 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Create an ssh key with Seahorse</title><link>http://www.ghacks.net/2010/12/18/create-an-ssh-key-with-seahorse/</link> <comments>http://www.ghacks.net/2010/12/18/create-an-ssh-key-with-seahorse/#comments</comments> <pubDate>Sat, 18 Dec 2010 19:30:23 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[seahorse]]></category> <category><![CDATA[secure shell]]></category> <category><![CDATA[ssh]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=38082</guid> <description><![CDATA[Seahorse is a very powerful tool for the creation and managing of various keys. Seahorse is the default keyring manager for the GNOME desktop. I have covered Seahorse here on Ghacks before (see &#8220;Create, sign, and publish your PGP keys with Seahorse&#8220;), but one aspect I didn&#8217;t cover was the use of Seahorse for secure [...]]]></description> <content:encoded><![CDATA[<p>Seahorse is a very powerful tool for the creation and managing of various keys. Seahorse is the default keyring manager for the GNOME desktop. I have covered Seahorse here on Ghacks before (see &#8220;<a
title="Seahorse" href="http://www.ghacks.net/2009/09/19/create-sign-and-publish-your-pgp-key-with-seahorse/" target="_blank">Create, sign, and publish your PGP keys with Seahorse</a>&#8220;), but one aspect I didn&#8217;t cover was the use of Seahorse for secure shell keys. As you know, you can create secure shell keys that can be used for an even more secure ssh environment. I have shown how this is done via command line (see my article &#8220;<a
href="http://www.ghacks.net/2009/10/17/five-handy-secure-shell-tips-and-tricks/" target="_blank">Five handy secure shell tips and tricks</a>&#8220;), but did you know that this can be taken care of using the Seahorse GUI? Let&#8217;s take a look and see how this is done.</p><p><span
id="more-38082"></span>I will assume you already have Seahorse installed on your desktop. I will also assume you have access to the remote machine via ssh. With that in mind, let&#8217;s get started.</p><p><strong>Step 1: Fire up the GUI</strong></p><p>You will find the Seahorse GUI in <strong>System &gt; Preferences &gt; Passwords and Encryption Keys.</strong> Start it up and you will see the standard Seahorse GUI. In that GUI, the tab you want to work with is the My Personal Keys tab. Click on that tab and you will see any personal keys you have already created. If you do not see any, you have to first create a key.</p><p><strong>Step 2: Creating a key</strong></p><div
id="attachment_38083" class="wp-caption alignleft" style="width: 446px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/ssh_key_seahorse.png"><img
class="size-full wp-image-38083" src="http://www.ghacks.net/wp-content/uploads/2010/12/ssh_key_seahorse.png" alt="" width="436" height="337" /></a><p
class="wp-caption-text">Figure 1</p></div><p>To begin the process of creating a key, click <strong>File &gt; New</strong> and a small window will open (see Figure 1). From that new window click Secure Shell Key and then click Continue. When you do this you will be prompted for the following:</p><ul><li>Key Description.</li><li>Advanced options: Key type and strength.</li></ul><p>You can elect to set up the key or just create they key. Click Just Create and you will be prompted to create a passphrase (and confirm the passphrase). Once you have created your key it will appear in the Personal Keys tab.</p><p><strong>Step 3: Set up key for secure shell.</strong></p><p>The next step is to set that newly created key up to be used for Secure Shell. You need to have access to the remote machine at this point because the key will be automatically copied for you.</p><p>Go back to the personal keys tab and right click the key you want to set up for Secure Shell. When you right click it, select the option for Configure Key for Secure Shell. When you select this a new window will open asking for two pieces of information:</p><ul><li>Computer name.</li><li>Login name</li></ul><p>If you do not have the computer name in your <strong>/etc/hosts</strong> file you can just use the computer&#8217;s IP address for the Computer Name. For the Login Name you must use a legitimate login on the remote computer. When you have those two pieces entered click Setup and you will be prompted for the remote username&#8217;s password. Upon successful authentication the key will have been copied and you are ready to go. You can now ssh to that machine with the added security of ssh key authentication.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/12/18/create-an-ssh-key-with-seahorse/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Use a secure shell configuration file for easier use</title><link>http://www.ghacks.net/2010/03/25/use-a-secure-shell-configuration-file-for-easier-use/</link> <comments>http://www.ghacks.net/2010/03/25/use-a-secure-shell-configuration-file-for-easier-use/#comments</comments> <pubDate>Thu, 25 Mar 2010 21:08:55 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[secure shell]]></category> <category><![CDATA[ssh]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=23953</guid> <description><![CDATA[If you&#8217;ve ever used secure shell you know that it can get a little daunting with all of the command options available. But did you know you can make this task much easier with the help of secure shell user configuration files? With these files (unique to each user) you can configure secure shell to [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve ever used secure shell you know that it can get a little daunting with all of the command options available. But did you know you can make this task much easier with the help of secure shell user configuration files? With these files (unique to each user) you can configure secure shell to behave certain ways with certain hosts, or you can create global configuration options for all secure shell connections.</p><p>In this article I will show you how to take advantage of the secure shell user-specific configuration files.</p><p><span
id="more-23953"></span><strong>Assumptions</strong></p><p>Naturally this article will assume you have secure shell installed and working. Now these configurations only work for the secure shell client, not the server. I will also assume the client from which you will be connecting from has a working internet connection and the hosts you want to connect to are reachable using secure shell as per normal. With that said, let&#8217;s get down to work.</p><p><strong>Configuration file location</strong></p><p>If you take a look at you <strong>~/.ssh</strong> directory you probably will not find a configuration file. Instead you will have to create one. Fear not, it&#8217;s simple. The file that secure shell will look for is called <strong>config</strong>. So open up a terminal window, open up your favorite editor, and create the file <strong>~/.ssh/config</strong>.</p><p><strong>Possible options</strong></p><p>Let&#8217;s look at a sample config file. Say you have host <em>ssh.sample.host</em> that is the target host. You want to be able to forward X11 and the username on the host you want to connect to is <em>jack</em>. This configuration file would look like:</p><p><em>Host ssh.sample.host</em></p><p><em>ForwardX11 yes</em></p><p><em>User jack</em></p><p>Now when you issue the command <em>ssh ssh.sample.host </em>all you will need to do is enter the user password. This command would replace the usual <em>ssh -l jack ssh.sample.host -X</em>. You could make this even easier by adding an entry for <em>ssh.sample.host</em> in your <strong>/etc/hosts</strong> file like so:</p><p>ssh.sample.host  NICKNAME</p><p>Where NICKNAME would be an easy name to remember. So now the command would look like <em>ssh NICKNAME</em>. That is much easier to remember and type.</p><p>You can also make options global. Let&#8217;s say you don&#8217;t want any forwarding of X11 on any ssh connection. For that you can create a section like this:</p><p><em>Host *</em></p><p><em>ForwardX11 no</em></p><p>This way none of your ssh connections will forward X11.For the global section you might want to add the line:</p><p><em>Protocol 2,1 </em></p><p>which will instruct ssh to always use SSH2 first.</p><p><strong>Global config</strong></p><p>If you like you can edit the <strong>/etc/ssh/ssh_config </strong>file to make some of these options global. If you do this, the options will apply to all users on the system (including root). If you want more granular control over your users ssh connections, and you have multiple users on a system, go with the user-specific configuration instead.</p><p><strong>Final thoughts</strong></p><p>Secure shell is certainly the way you need to be making your remote connections to and from your Linux machines. And because secure shell is so flexible, you have numerous options that will allow you very specific control over how users connect as well as making yours and their lives much simpler.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/03/25/use-a-secure-shell-configuration-file-for-easier-use/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Connect to a remote Linux desktop with x11vnc and Gtk VNC</title><link>http://www.ghacks.net/2010/01/24/connect-to-a-remote-linux-desktop-with-x11vnc-and-gtk-vnc/</link> <comments>http://www.ghacks.net/2010/01/24/connect-to-a-remote-linux-desktop-with-x11vnc-and-gtk-vnc/#comments</comments> <pubDate>Sun, 24 Jan 2010 19:48:29 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[troubleshooting]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[rdp]]></category> <category><![CDATA[remote-desktop]]></category> <category><![CDATA[secure shell]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[vnc]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=22555</guid> <description><![CDATA[Being able to do remote administration is crucial to many system administrators. And there are plenty of tools available for this job. You can use command line tools and full-blown GUI tools. Of course many users prefer to do things as simply as possible. Fortunately Linux has the right tools to make such a task [...]]]></description> <content:encoded><![CDATA[<p>Being able to do remote administration is crucial to many system administrators. And there are plenty of tools available for this job. You can use command line tools and full-blown GUI tools. Of course many users prefer to do things as simply as possible. Fortunately Linux has the right tools to make such a task simple. The ability to do graphical remote desktop administration is just a matter of having the vnc server running on the target machine and then running the desktop viewer on the local machine.</p><p>In this article I will show you how to take control of a remote Linux desktop with the help of <em>x11vnc</em>, Remote Desktop Viewer, and secure shell. You will, of course, have to have secure shell access to the remote machine. Other than that you have everything you need. So let&#8217;s get to work.</p><p><span
id="more-22555"></span><strong>Installation</strong></p><p>You will need the following installed in order to take on this task.</p><p><strong>Local machine</strong></p><ul><li>VNC client (such as gtk vnc)</li><li>Ssh client (openssh works fine)</li></ul><p><strong>Remote machine</strong></p><ul><li>Ssh server (openssh-server works great)</li><li>VNC server (x11vnc is my recommdation)</li></ul><p>Fire up your package management tool, search for the above applications, and install each. If you do not already have the secure shell server installed on the remote machine, you will need physical access in order to install the tools. If you already have the ssh server installed you can simply <em>ssh </em>to the remote machine and install the VNC server from command line (such as <em>sudo apt-get install x11vnc</em>) Once you have these installed you are ready to start setting up your connection.</p><p><strong>x11vnc</strong></p><p>The first thing you need to do is secure shell to the remote machine (we&#8217;ll say the remote machine is at IP address 192.168.1.10) and start up the VNC server. From the command line (on the remote machine) you will enter the command <em>x11vnc. </em>This will start the VNC server but you will not get your bash prompt returned to you. To have your VNC server running at all times you could add the line:</p><p><em>x11vnc &amp;</em></p><p>to the end of your <strong>/etc/rc.local </strong></p><p><strong>The Client Machine</strong></p><div
id="attachment_22557" class="wp-caption alignleft" style="width: 275px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/01/gtk_vnc.png"><img
class="size-full wp-image-22557 " src="http://www.ghacks.net/wp-content/uploads/2010/01/gtk_vnc.png" alt="" width="265" height="233" /></a><p
class="wp-caption-text">Figure 1</p></div><p>For the purposes of this tutorial I will use the Gtk VNC Viewer. It is a very simple to use, up to date, client. You will find this tool in <strong>Applications &gt; Internet</strong>. When you first start it up you will see a fairly straight-forward connection window. You only need enter:</p><ul><li>IP Address:Port: IP address and port of the remote machine (in the form of 192.168.1.10:5900). NOTE: x11vnc uses port 5900 by default.</li><li>User name: The user name you will connect with on the remote machine.</li><li>Password: Password of the user on the remote machine.</li></ul><p>If you know the above information is correct (and you know you&#8217;ll be connecting to this machine again) click the Add button to add the remote machine (as shown in Figure 1).</p><p>To connect to the remote machine either enter the information in the text areas and click the Connect button or double click on a saved machine from the list.</p><div
id="attachment_22558" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/01/gtk_vnc_connected.png"><img
class="size-medium wp-image-22558 " src="http://www.ghacks.net/wp-content/uploads/2010/01/gtk_vnc_connected-500x357.png" alt="" width="300" height="214" /></a><p
class="wp-caption-text">Figure 2</p></div><p>When you connect a new, maximized window will open showing your remote desktop (see Figure 2). From this window you can do the following:</p><ul><li>Disconnect: Disconnect from the remote machine.</li><li>Send keys: Send key-combinations to the remote machine.</li><li>Fullscreen: Switch to a full screen window.</li><li>Screenshot: Take a screen shot of the remote desktop.</li><li>Make icon on desktop: Create an icon that allows you to connect to this remote desktop with a double-click.</li></ul><p>You can now interact with this remote machine as if it were your own desktop.</p><p><strong>Final thoughts</strong></p><p>Taking advantage of the remote desktop is a great way to train users or trouble shoot problems on a remote machine. I use this exact setup for a number of clients. It works well.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/01/24/connect-to-a-remote-linux-desktop-with-x11vnc-and-gtk-vnc/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Manage your secure shell connections from the GNOME panel</title><link>http://www.ghacks.net/2009/12/23/manage-your-secure-shell-connections-from-the-gnome-panel/</link> <comments>http://www.ghacks.net/2009/12/23/manage-your-secure-shell-connections-from-the-gnome-panel/#comments</comments> <pubDate>Wed, 23 Dec 2009 19:31:00 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[GNOME panel]]></category> <category><![CDATA[secure shell]]></category> <category><![CDATA[ssh]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=21760</guid> <description><![CDATA[I work with secure shell all the time. Day in and day out I am administering personal machines and client machines with the help of ssh. After a while opening up a terminal window and entering the command to connect to all of these clients gets old. And we all know saving time and effort [...]]]></description> <content:encoded><![CDATA[<p>I work with secure shell all the time. Day in and day out I am administering personal machines and client machines with the help of ssh. After a while opening up a terminal window and entering the command to connect to all of these clients gets old. And we all know saving time and effort equates to saving money. So any tool that can help make your daily administrative life easier is a good thing.</p><p>One tool to help you manage your secure shell connections is the GNOME SSHmenu tool. This helpful application adds a small applet to the GNOME panel that allows you to make secure shell connections with a single click. And not only does this applet make it easy to connect, it also stores multiple connections, so all of your ssh connections are just a click away. In this tutorial I am going to show you how to install GNOME SSHmenu and set up your secure shell connections so you can take advantage of this handy tool.</p><p><span
id="more-21760"></span><strong>Installation</strong></p><p>If you fire up Synaptic and do a search for &#8220;ssh-menu&#8221; (no quotes), you will see two entries:</p><ul><li>ssh-menu</li><li>ssh-menu-gnome</li></ul><p>You will need to install both of these applications. So mark them both for installation and click the Apply button. Once these packages are installed you are ready to begin.</p><p><strong>Adding the applet</strong></p><p>Because this is an applet, not so much a stand-alone application, you need to add the applet to your GNOME panel in order to make it available for use. To do this right click the GNOME panel and select Add to Panel. From this new window you can select the SSH Menu Applet entry and then click the Add button. When you do this a window will appear asking if you want to manually add your hosts, or if you want to give the applet a shot at auto-configuring your connections. This auto-configuration reads your <strong>~/.ssh/known_hosts </strong>file in order set up your connections.</p><div
id="attachment_21763" class="wp-caption alignleft" style="width: 342px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/ssh_applet.png"><img
class="size-full wp-image-21763" src="http://www.ghacks.net/wp-content/uploads/2009/12/ssh_applet.png" alt="" width="332" height="25" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Of course you might not want all of your connections listed in the applet. For that you can select to manually configure your connections. If you make that choice the window will be dismissed and the SSH applet will appear in your panel (see Figure 1). As you can guess, the SSH applet is indicated by the &#8220;SSH&#8221; (no quotes).</p><p><strong>Manually adding hosts</strong></p><div
id="attachment_21764" class="wp-caption alignright" style="width: 238px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/gnome_ssh_preferences.png"><img
class="size-full wp-image-21764 " src="http://www.ghacks.net/wp-content/uploads/2009/12/gnome_ssh_preferences.png" alt="" width="228" height="234" /></a><p
class="wp-caption-text">Figure 2</p></div><p>In order to make your connections you first have to add hosts. Do do this left click the SSH applet and select Preferences. From the Preferences window (see Figure 2) you can add, edit, copy, and remove hosts. You can also (from the Options tab) back up your ssh connections configurations, enable &#8220;tear-off&#8221; menus, enable &#8220;open all windows&#8221;, and enable &#8220;open all tabs&#8221;. click the Add Host button.</p><div
id="attachment_21765" class="wp-caption alignleft" style="width: 202px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/gnome_ssh_add_host.png"><img
class="size-full wp-image-21765 " src="http://www.ghacks.net/wp-content/uploads/2009/12/gnome_ssh_add_host.png" alt="" width="192" height="159" /></a><p
class="wp-caption-text">Figure 3</p></div><p>When you click Add Host a new window will open (see Figure 3)where you enter the following information:</p><p><strong>Title</strong>: Name of the connection (this will appear in the SSH applet menu).</p><p><strong>Hostname</strong>: Address for connection. If you connect with a different username will be in the form <em>username@address. </em></p><p><strong>Geometry</strong>: This dictates to the applet the size of the terminal window to open. To make this easy for you can open a terminal, size it to the exact proportions you want, click the Grab button, and then click on that pre-sized terminal window.</p><p><strong>Profile</strong>: Select Default from this.</p><p>If you want to make sure your configuration works, click the Test button and a terminal window will open to your connection.</p><p><strong>Usage</strong></p><p>Now that you have the applet configured for a connection click the OK button to dismiss the preferences window, left click the applet, select the connection you just created, and wait for the prompt in the window that will open to request your password. Congratulations, you now have your first host set up in the applet. You can create as many as you like and then just select the one you want to connect to from the list.</p><p><strong>Final thoughts</strong></p><p>This simple tool has made my administration life so much easier. No more opening up terminals and typing ssh commands (or bothering with bash aliases). Now all of my secure shell connections are nothing more than a click away.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/12/23/manage-your-secure-shell-connections-from-the-gnome-panel/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <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> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/10/17/five-handy-secure-shell-tips-and-tricks/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Backup your Linux box with rsync</title><link>http://www.ghacks.net/2009/10/11/backup-your-linux-box-with-rsync/</link> <comments>http://www.ghacks.net/2009/10/11/backup-your-linux-box-with-rsync/#comments</comments> <pubDate>Sun, 11 Oct 2009 14:13:15 +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[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[automated backup]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[linux backup]]></category> <category><![CDATA[secure shell]]></category> <category><![CDATA[ssh]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=17157</guid> <description><![CDATA[In this Linux backup series we have taken a look at Flyback (&#8220;Quick and easy backups with Flyback&#8220;), Backerupper (&#8220;Simple gui backup tool Backerupper&#8220;), and Back In Time (&#8220;Linux Back In Time: Backup made easy&#8220;). But what Linux series would be complete without a command line entry? Not this one. There is one thing that [...]]]></description> <content:encoded><![CDATA[<p>In this Linux backup series we have taken a look at Flyback (&#8220;<a
title="Flyback" href="http://www.ghacks.net/2009/10/08/quick-and-easy-backups-with-flyback/" target="_blank">Quick and easy backups with Flyback</a>&#8220;), Backerupper (&#8220;<a
title="Backerupper" href="http://www.ghacks.net/2009/10/09/simple-gui-backup-tool-backerupper/" target="_blank">Simple gui backup tool Backerupper</a>&#8220;), and Back In Time (&#8220;<a
title="Back In Time" href="http://www.ghacks.net/2009/10/10/linux-back-in-time-backup-made-easy/" target="_blank">Linux Back In Time: Backup made easy</a>&#8220;). But what Linux series would be complete without a command line entry? Not this one.</p><p>There is one thing that most Linux backup tools have in common and that is their underlying technologies. In most cases one of the tools that make the GUI backup tools possible is the venerable rsync. Rsync is an incredibly fast and lightweight file copy tool that can not only copy files to and from a local machine, it can also copy over a network connection &#8211; which makes rsync an ideal candidate for user-generated backup scripts or cron jobs.</p><p>In this tutorial you will learn how easy it is to use rysnc to not only back up specified directories to an external usb drive, but also to backup over a network connection via ssh.</p><p><span
id="more-17157"></span><strong>Command structure</strong></p><p>The structure of the rsync command is:</p><p>rsync [OPTIONS] <strong>SOURCE</strong> <em>DESTINATION</em></p><p>Where SOURCE is the location of the directory to be backed up and DESTINATION is where the backup will be placed.</p><p>Now the structure of the command changes when you are employing a network facility such as ssh. At that point the command structure would look like:</p><p>rsync [OPTIONS] ssh <strong>SOURCE </strong><em>user@destination:/directory</em></p><p>Where <em>user </em>is the user name on the remote machine, <em>destination</em> would be either an IP address or domain, and <em>/directory</em> is the explicit path to the directory you want to back up to.</p><p><strong>Usage</strong></p><p>For the first example we are going to backup the directory <strong>/home/jlwallen/Documents</strong> to the directory <strong>/media/disk/BACKUPS</strong>. This destination is a directory located on an external USB drive obviously mounted to <strong>/media/disk</strong>. The command for this backup will be:</p><p><code>rsync -avh /home/jlwallen/Documents /media/disk/BACKUPS</code></p><p>This is where we run into our first &#8220;gotcha&#8221;. What happens with the above command is that any subdirectory in <strong>/home/jlwallen/Documents</strong> will be created on <strong>/media/disk/BACKUPS</strong>. So if you want to create a similar directory structure on the destination you should first create a parent directory similar to that of the source. So before you run the rsync command issue this command:</p><p><em>mkdir /media/disk/BACKUPS/Documents</em></p><p>The new rsync command would be:</p><p><code>rsync -avh /home/jlwallen/Documents /media/disk/BACKUPS/Documents</code></p><p>The options used in the above command are:</p><ul><li>a: Archive mode</li><li>v: Verbose mode</li><li>h: Output in human readable format.</li></ul><p>Now let&#8217;s backup the same source to a remote location with the help of secure shell. It will help your cause to first make sure you can log into the remove machine via ssh. Once you have that working you are ready to backup. Using our same example we are going to backup to user jlwallen at the IP address 192.168.1.10 to the directory <strong>/home/jlwallen/BACKUPS/Documents</strong>. To do this the command would look like:</p><p><code>rsync -avhe ssh /home/jlwallen/Documents jlwallen@192.168.1.10:/home/jlwallen/BACKUPS/Documents</code></p><p>The added option is e which allows you to specify the remote shell to use.</p><p>You will be prompted for the remote users&#8217; password and then the coping will begin. But what if you don&#8217;t want to have to use a password? If you are wanting to set up automated, remote backups you will have to allow this process to happen without entering a password. To do this you have to create an SSH key without a password. Here are the steps for this:</p><p>create an ssh key on the source machine with the command:</p><p><em>ssh-keygen -t dsa</em></p><p>Press enter when prompted for a password.</p><p>Once the key is created copy that key to the destination key with the following command:</p><p><code>ssh-copy-id -i .ssh/id_dsa.pub username@destination</code></p><p>Where username is the user on the remote machine and destination is the IP or domain of the remote machine.</p><p>Now rsync copying can be done without having to enter a password.</p><p><strong>Final thoughts</strong></p><p>The nice thing about this setup is you can now use rsync to create a cron job for backup automation. Rsync is an incredibly flexible and reliable means for backing up your directories and files. It should be since it is the foundation that so many other backup tools were based on.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/10/11/backup-your-linux-box-with-rsync/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Get To Know Linux: Secure Shell</title><link>http://www.ghacks.net/2009/02/17/get-to-know-linux-secure-shell/</link> <comments>http://www.ghacks.net/2009/02/17/get-to-know-linux-secure-shell/#comments</comments> <pubDate>Tue, 17 Feb 2009 18:05:37 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[port 22]]></category> <category><![CDATA[secure shell]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[sshd]]></category> <category><![CDATA[x tunneling]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10615</guid> <description><![CDATA[If you spend enough time with Linux at some point you are going to want (or need) to log on to a remote machine. And logging on to a remote machine is something you want to do in a secure enviroment. To gain security when having to do any remote administration, your best bet is [...]]]></description> <content:encoded><![CDATA[<p>If you spend enough time with Linux at some point you are going to want (or need) to log on to a remote machine. And logging on to a remote machine is something you want to do in a secure enviroment. To gain security when having to do any remote administration, your best bet is secure shell.</p><p>Secure shell was created as a replacement for telnet because telnet transmitted unencrypted passwords. The encryption is handled via public key cryptography. Through secure shell the user can issue commands on a remote server or even tunnel the X protocol in order to run remote graphic applications locally.</p><p><span
id="more-10615"></span>Using secure shell on Linux will require you to install openssh-clients and if you want to run an secure shell server (so others can secure shell into your machine) you will need to install openssh-server. These can be found in your Add/Remove Program utility. During the installation you will most likely be informed that the installer needs to generate a key. You won&#8217;t have to do anything for this key generation. And, depending upon the Add/Remove Program utility that you use you may not even see any sign that this is happening.</p><p><strong>Basic usage</strong></p><p>To use secure shell you will need to open up a terminal window (gnome-terminal, konsole, aterm, eterm, etc). Once this is open you can begin. The structure of the command is:</p><p>ssh OPTIONS REMOTE_SERVER_ADDRESS</p><p>Secure shell has quite a list of options available. For a complete listing of these options issue the command <em>man ssh</em> to see them all. But the most useful options are:</p><ul><li>-v This gives verbose output so you can see all output given as a connection is being made.</li><li>-l This allows you to specify a username for the connection.</li><li>-X This instructs the remote server to allow the tunneling of X protocols.</li></ul><p>Say you want to connect user <strong>jlwallen</strong> to server <strong>192.168.1.10</strong> and you want to tunnel X. The command to do this would be:</p><p><em>ssh -v -l jlwallen 192.168.1.10 -X</em></p><p>You would see a good deal of information pass by before you are asked for the users password. If this is the first time you&#8217;ve attempted this connection you will be prompted (via Y or N) if you want to allow the addition of a key to be placed in the ~/.ssh/known_hosts file. If you are wanting to make this connection you will have to accept this key.</p><p><strong>ssh daemon</strong></p><p>Now if you want to have the secure shell daemon running on your machine (so that users can log on) you will have to start the deamon. The ssh daemon (sshd) is started from the init.d system. On a Fedora-like system this daemon is started like so:</p><p>/etc/rc.d/init.d/sshd start</p><p>On a Ubuntu-based system this daemon is started like so:</p><p>/etc/init.d/sshd start</p><p>Once the daemon is started users can now log in. NOTE: The sshd daemon runs on port 22 so you will need to have that port open in order to allow connections.</p><p><strong>Final Thoughts</strong></p><p>Secure shell is one of the better means of logging into a remote machine securly. Sure there are other methods but secure shell is easy to use, reliable, and secure.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/17/get-to-know-linux-secure-shell/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Connect Bot SSH Client For Android Phone</title><link>http://www.ghacks.net/2009/02/07/connect-bot-ssh-client-for-android-phone/</link> <comments>http://www.ghacks.net/2009/02/07/connect-bot-ssh-client-for-android-phone/#comments</comments> <pubDate>Sat, 07 Feb 2009 15:54:07 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Google Android]]></category> <category><![CDATA[Mobiles]]></category> <category><![CDATA[android]]></category> <category><![CDATA[android apps]]></category> <category><![CDATA[android connectbot]]></category> <category><![CDATA[android secure shell]]></category> <category><![CDATA[android ssh]]></category> <category><![CDATA[connect bot]]></category> <category><![CDATA[connectbot]]></category> <category><![CDATA[g1 apps]]></category> <category><![CDATA[google android]]></category> <category><![CDATA[google g1]]></category> <category><![CDATA[secure shell]]></category> <category><![CDATA[t-mobile g1]]></category> <guid
isPermaLink="false">http://www.ghacks.net/2009/02/07/connect-bot-ssh-client-for-android-phone/</guid> <description><![CDATA[I bought the T-Mobile G1 phone just a few days ago and have been playing around with the Android Market quite a bit. One of the applications that I discovered on Android Market was Connect Bot. Connect Bot is a SSH Client for the Android Phone which webmasters (and other users) can use to connect [...]]]></description> <content:encoded><![CDATA[<p>I bought the T-Mobile G1 phone just a few days ago and have been playing around with the Android Market quite a bit. One of the applications that I discovered on Android Market was Connect Bot. Connect Bot is a SSH Client for the Android Phone which webmasters (and other users) can use to connect to their servers right from the Android Phone.</p><p><a
href="http://code.google.com/p/connectbot/">Connect Bot</a> is probably the number one must have application for webmasters who operate their own servers. It can be used to log into the server using the phone. For those who do not know what SSH is, it basically allows a user to exchange data using a secure channel between two network devices.</p><p>Some examples where this could come in handy would be to restart the web server, configure services or monitor the connections, processes and resource usage while on the road.</p><p><span
id="more-10396"></span><img
src="http://www.ghacks.net/wp-content/uploads/2009/02/android_ssh.png" alt="android ssh" title="android ssh" width="480" height="320" class="alignnone size-full wp-image-10394" /><br
/> <img
src="http://www.ghacks.net/wp-content/uploads/2009/02/android_phone_secure_shell.png" alt="android phone secure shell" title="android phone secure shell" width="480" height="320" class="alignnone size-full wp-image-10395" /></p><p>The application can be installed right from the Android Market. Must have for any webmaster and admin with their own servers.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/07/connect-bot-ssh-client-for-android-phone/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
