<?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>tolaris.com &#187; ssh</title>
	<atom:link href="http://www.tolaris.com/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tolaris.com</link>
	<description>When the going gets tough, the tough sniff packets.</description>
	<lastBuildDate>Tue, 24 Jan 2012 17:47:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Reconnecting your SSH agent to a detached GNU screen session</title>
		<link>http://www.tolaris.com/2011/07/12/reconnecting-your-ssh-agent-to-a-detached-gnu-screen-session/</link>
		<comments>http://www.tolaris.com/2011/07/12/reconnecting-your-ssh-agent-to-a-detached-gnu-screen-session/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 20:49:35 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1455</guid>
		<description><![CDATA[I like GNU Screen. I also like SSH agent forwarding. Combining these two makes for very easy, password-less, large file transfers between two remote hosts. When you login via SSH with agent forwarding enabled, the SSH server creates a socket in /tmp/ssh-[HASH]/agent.[PID]. This allows SSH sessions on the remote host to access your agent back [...]]]></description>
			<content:encoded><![CDATA[<p>I like <a href="http://www.tolaris.com/2010/02/28/flying-without-a-net/">GNU Screen</a>. I also like <a href="http://www.tolaris.com/2009/09/05/using-ssh-agent-and-setting-key-access-limits/">SSH agent forwarding</a>. Combining these two makes for very easy, password-less, large file transfers between two remote hosts.</p>
<p><span id="more-1455"></span>When you login via SSH with agent forwarding enabled, the SSH server creates a socket in /tmp/ssh-[HASH]/agent.[PID]. This allows SSH sessions on the remote host to access your agent back on your workstation. Commands that use the agent, like ssh, scp, and rsync, find it by reading the SSH_AUTH_SOCK environment variable.</p>
<pre>root@server:~#  echo $SSH_AUTH_SOCK
/tmp/ssh-NshdZD1538/agent.1538</pre>
<p>This path is readable only to the current user (and root, which is why agent forwarding is dangerous if you don&#8217;t trust the root users of servers you access). GNU Screen inherits SSH_AUTH_SOCK like any other process. However, what happens when you detach your screen session and logout? When you login again and re-attach to screen, SSH_AUTH_SOCK is pointing to the wrong file:</p>
<pre>root@server:~# screen -r
root@server:~# echo $SSH_AUTH_SOCK
/tmp/ssh-NshdZD1538/agent.1538
root@server:~# ls /tmp/ssh-NshdZD1538/agent.1538
ls: cannot access /tmp/ssh-NshdZD1538/agent.1538: No such file or directory
root@server:~# ssh localhost
root@localhost's password:</pre>
<p>I have found a <a href="http://superuser.com/questions/180148/how-do-you-get-screen-to-automatically-connect-to-the-current-ssh-agent-when-re-a">number</a> of <a href="http://sweetjesus26.livejournal.com/16782.html">solutions</a> of <a href="http://blog.endpoint.com/2011/02/gnu-screen-sshauthsock-my-new-approach.html">varying</a> <a href="http://justinchouinard.com/blog/2010/04/10/fix-stale-ssh-environment-variables-in-gnu-screen-and-tmux/">complexity</a>. But here is a simple one-liner which finds an agent socket and attaches to it. This works in the current screen session (not just new shells within that session), and you don&#8217;t have to modify .bashrc or switch to zsh to use it.</p>
<p><code>export SSH_AUTH_SOCK=$(find /tmp/ssh-* -user `whoami` -name agent\* | tail -n 1)</code></p>
<p>This finds the most recent SSH agent owned by the user, and assigns it to SSH_AUTH_SOCK. This doesn&#8217;t guarantee that you&#8217;ll attach to the socket created for your current SSH session, only the most recent one. For instance, you could login with three SSH sessions and this will find the latest one. But if you&#8217;re using screen, you only really need one SSH session anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2011/07/12/reconnecting-your-ssh-agent-to-a-detached-gnu-screen-session/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Telnet URL handler, part 3</title>
		<link>http://www.tolaris.com/2010/08/27/telnet-url-handler-part-3/</link>
		<comments>http://www.tolaris.com/2010/08/27/telnet-url-handler-part-3/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 17:29:08 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1065</guid>
		<description><![CDATA[Philip continues to play devil&#8217;s advocate / script kiddie for my telnet URL handler. My input checker allowed host/port definitions to begin with a hyphen character. That&#8217;s an invalid domain name, so I ignored the possibility that someone might try it. Philip used it to pass a switch to the telnet/ssh command. Here is attempt [...]]]></description>
			<content:encoded><![CDATA[<p>Philip <a href="http://www.tolaris.com/2010/08/24/a-better-telnet-url-handler/comment-page-1/#comment-233">continues to play devil&#8217;s advocate / script kiddie</a> for my telnet URL handler. My input checker allowed host/port definitions to begin with a hyphen character. That&#8217;s an invalid domain name, so I ignored the possibility that someone might try it. Philip used it to pass a switch to the telnet/ssh command.</p>
<p><span id="more-1065"></span>Here is attempt number 3, now with more complicated regular expressions:</p>
<pre>#!/usr/bin/perl
# parse URL
($protocol,$host) = split /:\/\//, $ARGV[0];
($host,$port) = split /:/, $host;

# validate input
if ( $protocol !~ /^(telnet|ssh)$/ ||
   $host !~ /^[a-zA-Z0-9][a-zA-Z0-9.-]*$/ ||
   $port !~ /(^[a-zA-Z0-9][a-zA-Z0-9_-]*$|^$)/ ) {
        warn "Invalid URL";
        exit 1;
}

# if SSH, add -p argument
if ( $protocol eq "ssh" &#038;&#038; $port != '' ) { $port = "-p $port" ; }

# call terminal emulator
exec("konsole --hold -e $protocol $host $port");
exit;</pre>
<p>Your move, <em>sir</em>.</p>
<p>You can download an updated url-terminal script <a href='http://www.tolaris.com/blog/wp-content/uploads/2010/08/url-terminal1.gz'>here</a>. You can read the post that started this <a href="/2010/08/23/enabling-telnet-and-ssh-urls-in-firefox-for-linux/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/08/27/telnet-url-handler-part-3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>A better telnet URL handler</title>
		<link>http://www.tolaris.com/2010/08/24/a-better-telnet-url-handler/</link>
		<comments>http://www.tolaris.com/2010/08/24/a-better-telnet-url-handler/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 21:48:40 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1044</guid>
		<description><![CDATA[After I wrote yesterday&#8217;s post, Philip reminded me of the dangers of not validating your inputs. Here is a better telnet/ssh handler which checks the URL passed to it. Update 2010-08-27: don’t use this script either! See my next post for a better one. #!/usr/bin/perl # parse URL ($protocol,$host) = split /:\/\//, $ARGV[0]; ($host,$port) = [...]]]></description>
			<content:encoded><![CDATA[<p>After I wrote <a href="http://www.tolaris.com/2010/08/23/enabling-telnet-and-ssh-urls-in-firefox-for-linux/">yesterday&#8217;s post</a>, <a href="http://www.tolaris.com/2010/08/23/enabling-telnet-and-ssh-urls-in-firefox-for-linux/comment-page-1/#comment-230">Philip reminded me</a> of the dangers of not validating your inputs. Here is a better telnet/ssh handler which checks the URL passed to it.</p>
<p><span id="more-1044"></span><em>Update 2010-08-27</em>: don’t use this script either! See my <a href="http://www.tolaris.com/2010/08/27/telnet-url-handler-part-3/">next post</a> for a better one.</p>
<pre>#!/usr/bin/perl
# parse URL
($protocol,$host) = split /:\/\//, $ARGV[0];
($host,$port) = split /:/, $host;

# validate input
if ( $protocol !~ /^(telnet|ssh)$/ || $host !~ /^[a-zA-Z0-9.-]+$/ || $port !~ /(^[a-zA-Z0-9_-]+$|^$)/ ) {
        warn "Invalid URL";
        exit 1;
}

# if SSH, add -p argument
if ( $protocol eq "ssh" &#038;&#038; $port != '' ) { $port = "-p $port" ; }

# call terminal emulator
exec("konsole --hold -e $protocol $host $port");
exit;</pre>
<p>This script only accepts <code>telnet://</code> and <code>ssh://</code> URLs, where the host is a valid domain name and the port is a valid port (including text aliases like &#8220;smtp&#8221; from <code>/etc/services</code>). It passes SSH port arguments correctly and tells Konsole to stay open after the session terminates.</p>
<p>You can download a more advanced form of this script <a href='http://www.tolaris.com/blog/wp-content/uploads/2010/08/url-terminal.gz'>here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/08/24/a-better-telnet-url-handler/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Enabling telnet:// and ssh:// URLs in Firefox for Linux</title>
		<link>http://www.tolaris.com/2010/08/23/enabling-telnet-and-ssh-urls-in-firefox-for-linux/</link>
		<comments>http://www.tolaris.com/2010/08/23/enabling-telnet-and-ssh-urls-in-firefox-for-linux/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 21:45:22 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1020</guid>
		<description><![CDATA[Firefox&#8217;s telnet protocol handler in Linux stopped working some time after version 3.0. I manage a network of switches, routers, and other devices with command-line interfaces. Wouldn&#8217;t it be nice to be able to click on telnet:// or ssh:// URLs again? As with most tinkering in firefox, start by typing &#8220;about:config&#8221; in the location bar. [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox&#8217;s telnet protocol handler in Linux stopped working some time after version 3.0. I manage a network of switches, routers, and other devices with command-line interfaces. Wouldn&#8217;t it be nice to be able to click on <code>telnet://</code> or <code>ssh://</code> URLs again?</p>
<p><span id="more-1020"></span>As with most tinkering in firefox, start by typing &#8220;about:config&#8221; in the location bar. Right click and select &#8220;New&#8221;, then &#8220;Boolean&#8221;. Create two entries:</p>
<pre>network.protocol-handler.expose.telnet = false
network.protocol-handler.expose.ssh = false</pre>
<p>Now, click on a <a href="telnet://nethack.alt.org">telnet</a> or <a href="ssh://localhost">SSH</a> URL, and Firefox will prompt you for the application to use. This application must handle the full URL as an argument. On Linux, the easiest solution is to choose <code>/usr/bin/xdg-open</code>. This will open the user&#8217;s preferred terminal, whether that is gnome-terminal, konsole, or xterm. You can use xdg-open to open almost any type of file or URL.</p>
<p>Alternatively, choose <code>/usr/bin/putty</code>, or use a simple script as follows. Edit the last line to call whatever application you prefer.</p>
<p><em>Update 2010-08-25:</em> don&#8217;t use this script. See my <a href="/2010/08/24/a-better-telnet-url-handler/">next post</a> for a better one.</p>
<pre>#!/usr/bin/perl
# take URL of form telnet://target:port and call konsole

# get protocol and host
($proto,$addr) = split /:\/\//, $ARGV[0];

# convert "host:port" to "host port" (port is optional)
$addr =~ s/\:/\ /g;

`konsole -e $proto $addr\n`;</pre>
<p>A bit of history, for the curious. You may find instructions online stating to create values like these:</p>
<pre>network.protocol-handler.app.telnet = "/usr/bin/putty"
network.protocol-handler.warn-external.telnet = false</pre>
<p>This is the old method, used in releases prior to Firefox 3.5. These settings are now ignored.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/08/23/enabling-telnet-and-ssh-urls-in-firefox-for-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Remmina, the last remote desktop client you&#8217;ll ever need</title>
		<link>http://www.tolaris.com/2010/08/20/remmina-the-last-remote-desktop-client-youll-ever-need/</link>
		<comments>http://www.tolaris.com/2010/08/20/remmina-the-last-remote-desktop-client-youll-ever-need/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 22:43:29 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1003</guid>
		<description><![CDATA[I&#8217;ve been searching for a good remote desktop client for a long time. My requirements are simple. It must: save passwords manage connections via the GUI support VNC and RDP work with our IP KVM This last requirement is the kicker. When I change hosts on our Adderview IP KVM, it draws one frame at [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been searching for a good remote desktop client for a long time. My requirements are simple. It must:</p>
<ol>
<li>save passwords</li>
<li>manage connections via the GUI</li>
<li>support VNC and RDP</li>
<li>work with our IP KVM</li>
</ol>
<p>This last requirement is the kicker. When I change hosts on our <a href="http://www.adder.com/uk/products/adderviewip.aspx">Adderview IP KVM</a>, it draws one frame at 0&#215;0 resolution, and then changes to the resolution of the new host. This has crashed every VNC client I&#8217;ve tried except <a href="http://packages.ubuntu.com/lucid/xvnc4viewer">xvnc4viewer</a>. Which of course, doesn&#8217;t save passwords or have a GUI (the raw X menu when you press F8 does not count).</p>
<p>I have tried <a href="http://en.wikipedia.org/wiki/KRDC">KRDC</a>, <a href="http://projects.gnome.org/vinagre/">Vinagre</a>, <a href="http://www.tightvnc.com/download-old.php">xtightvncviewer</a>, and a number of simpler command-line VNC clients. They all seem to be designed to support the &#8220;my Mom needs tech support&#8221; problem, not the &#8220;I manage remote servers&#8221; problem. KRDC won&#8217;t even login to my KVM; it just hangs after authentication. I suppose that&#8217;s better than crashing, but it is still a show stopping bug for me.</p>
<p><span id="more-1003"></span>Over a year ago, I hacked up a scripted solution involving zenity GTK dialogs, saved password files, and xvnc4viewer, but I&#8217;m not going to release that. Instead, meet the last remote desktop client you&#8217;ll ever need: <a href="http://remmina.sourceforge.net/">Remmina</a>.</p>
<p>Remmina meets all of my requirements, has tons of useful features, and works flawlessly. Not only that, it is extremely responsive. Key presses are limited only by the round-trip time, with no added delay from VNC itself. There are no redrawing or tearing problems. It supports full-screen mode and scrolling inside a view port. It can forward over SSH and will use SSH keys files or your SSH key agent. It can synchronise the clipboard between host and remote server; this is the first time I&#8217;ve actually seen that feature work reliably. It can even open a standard SSH or SFTP session, or host a VNC server.</p>
<p>Installation is easy. An older release is available in the Ubuntu Lucid Universe repository, or get the latest version from their <a href="http://remmina.sourceforge.net/downloads.shtml">PPA</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/08/20/remmina-the-last-remote-desktop-client-youll-ever-need/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Upgrading from Kubuntu 9.10 to 10.04</title>
		<link>http://www.tolaris.com/2010/08/04/upgrading-from-kubuntu-9-10-to-10-04/</link>
		<comments>http://www.tolaris.com/2010/08/04/upgrading-from-kubuntu-9-10-to-10-04/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 20:39:36 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=967</guid>
		<description><![CDATA[Last week I upgraded from Kubuntu 9.10 &#8220;Karmic Koala&#8221; to 10.04 &#8220;Lucid Lynx&#8221;. The word &#8220;upgrade&#8221; here is misleading, since I chose to reformat to take advantage of filesystem changes. However, I imported much of my customisations from backup. Here are my notes on Lucid, from the perspective of a long-time Kubuntu user. My opinion [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I upgraded from Kubuntu 9.10 &#8220;Karmic Koala&#8221; to 10.04 &#8220;Lucid Lynx&#8221;. The word &#8220;upgrade&#8221; here is misleading, since I chose to reformat to take advantage of filesystem changes. However, I imported much of my customisations from backup. Here are my notes on Lucid, from the perspective of a long-time Kubuntu user.</p>
<p><span id="more-967"></span>My opinion is that Lucid improves on <a href="/2009/11/01/upgrading-from-kubuntu-9-04-to-9-10/">Karmic</a> in almost every way. That&#8217;s not saying much, since the KDE 4 upgrade has been so painful. We&#8217;re finally back to KDE 3.5 functionality, and speed is improving with each release. On the other hand, there are a lot of new features in the OS since Hardy &#8211; grub2, ext4, ecryptfs, upstart, kernel mode setting, compositing window management, Strigi indexing and Nepomuk semantic desktop. Some of these have dramatically improved performance, while others have increased system requirements just to add eye candy. It&#8217;s hard to evaluate KDE on its own, so I&#8217;m not going to focus on that.</p>
<p>I backed up my entire drive to an external USB drive formatted for ext3 using <a href="/tag/rsync/">rsync</a>. I then booted from the Kubuntu 10.04 AMD64 Desktop CD, and followed the default install options until the disk partitioning step. I always install with separate /, /home, and swap partitions (this normally makes upgrades easier, unless you are reformatting as I did here). I used ext4 for / and /home, and chose to encrypt my home directory. I then followed the rest of the steps and rebooted at the end.</p>
<p>Following the reboot, I used rsync to restore my lost files and most of my dotfiles &#8211; .mozilla, .gnome, .gconf, .Virtualbox, and the like. However, I did not restore .kde. Instead I manually copied only some configs, for KGPG, Akregator, and Kopete. The rest of my KDE apps I reconfigured from scratch. I did this because we use Kolab at work, which integrates with Kontact but can be fussy with local contacts files. As of Lucid, Kontact uses Akonadi to manage contacts. I expected trouble, and found it. More on that later.</p>
<p>Finally, since I have an encrypted home directory, I also encrypted swap and created a tmpfs on /tmp. I followed the steps in <a href="/2009/11/14/securing-laptops-with-ecryptfs-cryptsetup-and-tmpfs/">my guide</a>, and rebooted with no problems.</p>
<p>What&#8217;s better:</p>
<p>The <strong>ext4</strong> filesystem is noticeably faster. This is the reason I reformatted instead of upgrading. I used ext3 under Karmic, and really wanted to see if what I&#8217;d been hearing about the speedy new filesystem is true. It is. It&#8217;s faster for booting and it&#8217;s faster for reading large data. My Virtualbox virtual machines load in almost half the time, even compared to the same Virtualbox 3.2.6 release on Karmic. I suppose there could be other differences contributing to this but it really stands out. I haven&#8217;t run an fsck yet but others report that it is much faster as well.</p>
<p>ext4 has definitely improved performance of copying data inside my encrypted home directory. I barely notice the performance hit from using ecryptfs now. The only time I do is when using rsync to compare large directories (like when my backup process examines my mail archive).</p>
<p>There is a new <strong>touchpad control</strong> in KDE Control Center. This enables gestures, including two-finger scrolling (but not pinch-to-zoom, which I hope is forthcoming), and different actions for tapping in corners, multi-finger tapping, and so on. Still missing is tap suppression (accidentally tapping while typing), so I still use syndaemon. Create ~/.kde/Autostart/syndaemon.sh, make it executable, and insert:</p>
<pre>#!/bin/sh
# Disable touchpad while typing to prevent accidental tapping.
/usr/bin/syndaemon -d -t -i 1</pre>
<p>The <strong>device notifier plasmoid</strong> now has multiple actions when opening attached storage devices, and can be configured to automatically mount drives. This is a vast improvement.</p>
<p>The <strong>system tray plasmoid</strong> now obeys my auto-hide preferences. Under Jaunty and Karmic, some applications had overriding preferences that caused them to always be hidden or visible. For instance, it was impossible to make KGPG always visible. I frequently use KGPG, so this caused me to almost always have the system tray expanded to show all applications.</p>
<p><strong>Firefox/KDE integration</strong> works very well. Open/save file dialogs use KDE, and menus and icons use KDE defaults. The printer dialog is still the native Firefox one.</p>
<p><strong>virt-manager</strong> is vastly improved. The GUI is more responsive when connecting, is prettier, and has graphs for CPU, disk, and network I/O.</p>
<p><strong>ClusterSSH</strong> works with KWin again. Since 8.10, <a href="http://sourceforge.net/projects/clusterssh/">ClustterSSH</a> has been nearly broken in KDE. First, simply starting it caused copy (to clipboard or selection) to stop working in most QT/KDE apps. Second, the ClusterSSH master window would grab focus and prevent you from giving focus to any of its children xterms. This made it very hard to run commands on just one host without running it on all. I gave up and used various other techniques for managing my servers. But nothing beats ClusterSSH for managing 2-20 servers at once, and I&#8217;ve sorely missed it. Welcome back, old friend!</p>
<p>What needed tweaking:</p>
<p>The <strong>Oxygen</strong> window decoration theme still doesn&#8217;t colourise the active window. Open System Settings, go to &#8220;Appearance&#8221;, then the &#8220;Windows&#8221; side bar.  Under the &#8220;Window Decoration&#8221; tab, choose &#8220;Oxygen&#8221;.  Under the &#8220;Decoration Options&#8221; area, choose the &#8220;Fine Tuning&#8221; sub-tab. Check &#8220;Outline active window title&#8221;.</p>
<p><strong>Hotkeys in Kmenu</strong> are ignored. I use a few quick-launch shortcuts, such as &#8220;Win+T&#8221; to start a terminal. You can set these when editing the K menu, but they are <a href="http://kubuntuforums.net/forums/index.php?topic=3110677.0">ignored by default</a>. Open System Settings, select &#8220;Input Actions&#8221;, and then check &#8220;KMenuEdit&#8221;.</p>
<p><strong>VirtualBox and virt-manager</strong> don&#8217;t play well together. I don&#8217;t use Xen or KVM on my desktop, but I do manage several KVM-based virtual machine servers. Thanks to the new &#8220;install recommends&#8221; preference in the package manager, simply installing virt-manager also installs libvirt-bin. This loads the kvm-intel or kvm-amd modules on boot, which then <a href="http://forums.virtualbox.org/viewtopic.php?p=52266&#038;sid=f2a1898a3036872a16717f7e52e8b4e3">prevents VirtualBox from starting virtual machines</a>, with the error &#8220;VirtualBox can&#8217;t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).&#8221;</p>
<p>I suppose this is really a problem with the &#8220;install recommends&#8221; behaviour. I&#8217;ve complained about that elsewhere, but I always repeat a good gripe when the opportunity presents.</p>
<p>The solution is to edit /etc/default/libvirt-bin and disable libvirtd:</p>
<pre>start_libvirtd="no"</pre>
<p>And for good measure, blacklist the modules. Create /etc/modprobe.d/local.conf and insert:</p>
<pre>blacklist kvm-intel
blacklist kvm-amd</pre>
<p>What still needs work:</p>
<p><strong>Akonadi</strong> doesn&#8217;t start before Kontact tries to access it. <a href="http://kubuntuforums.net/forums/index.php?topic=3112175.0">This solution</a> (autostarting &#8220;akonadictl start&#8221; at login) worked for me, although I (painfully) developed it independently. If only I had used Google.</p>
<p><strong>openvpn with knetworkmanager</strong> still doesn&#8217;t work. I still prefer Gnome&#8217;s network manager applet, which works just fine with Kubuntu. Kill knetworkmanager, and start nm-applet. Next time you login, KDE will tell you that another network manager is running, and ask you if you still want to use Knetworkmanager. Say no. Also, OpenVPN support is more reliable under Lucid. Using Gnome network manager with Kubuntu Karmic, the OpenVPN service would periodically fail to start. Editing VPN preferences and then hitting OK sometimes resolved it, but at other times it was an annoying and random dance to make it work. This seems to be resolved under Lucid.</p>
<p><strong>OpenOffice/KDE integration</strong> is improved since Karmic, but still has drawing bugs. In particular, the zoom slider in the lower right often disappears. It&#8217;s still there, and clicking in the area makes it reappear and zooms. I prefer the &#8220;100% / 75% / &#8230;&#8221; pull-down of the stock OpenOffice theme, however. This is a vast improvement over the Karmic integration, where simply dragging a spreadsheet tab in Calc crashed OpenOffice, but I&#8217;d like to see more development here.</p>
<p>Otherwise, <a href="/2009/11/01/upgrading-from-kubuntu-9-04-to-9-10/">my comments</a> regarding Karmic still hold. Google Earth and Kwin play nicely, qtcurve (KDE/GTK integration) is awesome and no longer has the font bug, and Plasma and Kwin are faster and more stable. Lucid is no great leap forward and Kubuntu is still not an innovator among KDE distributions like Ubuntu is to Gnome. But it is an incremental improvement worth using if you prefer KDE.</p>
<p>I have had a Lucid <a href="/apt-repository/">repository</a> since upgrading my media PC and servers. It now includes dfreer&#8217;s znes32 for AMD64 (still working on Lucid) and kregexpeditor (you can have it when you pry it from my cold, dead hands).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/08/04/upgrading-from-kubuntu-9-10-to-10-04/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using SSH agent and setting key access limits</title>
		<link>http://www.tolaris.com/2009/09/05/using-ssh-agent-and-setting-key-access-limits/</link>
		<comments>http://www.tolaris.com/2009/09/05/using-ssh-agent-and-setting-key-access-limits/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 08:59:45 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=487</guid>
		<description><![CDATA[You really shouldn&#8217;t allow SSH logins via password. This is doubly true for root. On most of my hosts we allow SSH for normal users with a password, but restrict root to SSH keys only. And we always protect against brute force attacks with fail2ban. If you aren&#8217;t already using SSH keys and SSH agent, [...]]]></description>
			<content:encoded><![CDATA[<p>You really shouldn&#8217;t allow SSH logins via password.  This is doubly true for root.  On most of my hosts we allow SSH for normal users with a password, but restrict root to SSH keys only.  And we always protect against brute force attacks with <a href="http://www.fail2ban.org">fail2ban</a>.</p>
<p>If you aren&#8217;t already using <a href="http://mah.everybody.org/docs/ssh">SSH keys and SSH agent</a>, you should.  SSH agent forwarding allows for secure sideways authentication.  For example:</p>
<p><span id="more-487"></span>
<pre>tyler@baal:~$ ssh -A root@server1
Last login: Fri Sep  4 15:47:02 2009 from network-192-168-1-2.example.com
Linux server1 2.6.24-22-generic #1 SMP Mon Nov 24 18:32:42 UTC 2008 i686

root@server1.bed.talia.net:~# scp /tmp/file root@server2:/tmp/
file                                           100%    0     0.0KB/s   00:00
root@server1.bed.talia.net:~#</pre>
<p>Notice how I was never prompted for a password or SSH passphrase?  That&#8217;s because in step one, I had an SSH agent already holding my passphrase.  And in step two, scp on server1 securely forwarded the key request back to my workstation and server2 accepted it.  No passwords.  Fast and easy.</p>
<p>This allows me to improve security in several ways.</p>
<ol>
<li>I don&#8217;t have to remember my root passwords.  I am free to store them in an encrypted file or encrypted password store.</li>
<li>Because I don&#8217;t have to remember them, I don&#8217;t have to make them memorable.  I generate all passwords with <code>pwgen -B</code>.</li>
<li>Because I don&#8217;t have to remember them, they don&#8217;t have to be the same.  If I have two servers or 50, they can all have unique passwords.</li>
</ol>
<p>Note for Ubuntu users: if you use a GPG key agent such as KGPG, you&#8217;ve probably already got an SSH key agent running.  You just need to configure it to load your keys at login time.</p>
<p>Now, suppose you have a key that an automated script is using.  Or you have a user that you want to be able to access your servers from work, but not from home?  This is where key access limits come in.  In ~/.ssh/authorized_keys:</p>
<pre>from="*.example.com" ssh-rsa AAAAB3Pca[...]Fy== user@server.example.com</pre>
<p>You can also limit by IP or have a list of limits.</p>
<pre>from="*.example.com,192.168.*" ssh-rsa AAAAB3Pca[...]Fy== user@server.example.com</pre>
<p>Now this key will only be accepted from servers whose IP addresses resolve to something in &#8220;example.com&#8221;, or whose IP address begins with &#8220;192.168.&#8221;.  Note that using a hostname here means the user can&#8217;t login if DNS doesn&#8217;t work, or if reverse DNS records are wrong for your IP.  For all but senior administrators, this is probably an acceptable risk.</p>
<p>Update 2009-09-07 13:49 UTC: As I&#8217;ve just discovered, you may have to list IPv4 addresses in their IPv6 form.  For example:</p>
<pre>from="::ffff:192.168.*,192.168.*" ssh-rsa AAAAB3Pca[...]Fy== user@server.example.com</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/09/05/using-ssh-agent-and-setting-key-access-limits/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dirty sshfs hack: smount</title>
		<link>http://www.tolaris.com/2009/06/30/dirty-sshfs-hack-smount/</link>
		<comments>http://www.tolaris.com/2009/06/30/dirty-sshfs-hack-smount/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 20:13:30 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=390</guid>
		<description><![CDATA[I love SSHFS. I manage a lot of machines, and I very often want to do something like this: diff root@server1:/etc/randomrcfile root@server2:/etc/randomrcfile There are ways to do this with Kompare (a KDE diff app) and the fish:// Kioslave, but not on the command line. SSHFS makes it easy: mkdir /tmp/server1 /tmp/server2 sshfs root@server1:/ /tmp/server1/ sshfs [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://en.wikipedia.org/wiki/SSHFS">SSHFS</a>.  I manage a lot of machines, and I very often want to do something like this:</p>
<p><code>diff root@server1:/etc/randomrcfile root@server2:/etc/randomrcfile</code></p>
<p>There are ways to do this with Kompare (a KDE diff app) and the fish:// Kioslave, but not on the command line.  SSHFS makes it easy:</p>
<p><code>mkdir /tmp/server1 /tmp/server2<br />
sshfs root@server1:/ /tmp/server1/<br />
sshfs root@server2:/ /tmp/server2/<br />
diff /tmp/server1/etc/randomrcfile /tmp/server2/etc/randomrcfile</code></p>
<p>I do this so often that I&#8217;ve written my own script to handle this for me, <a href="http://www.tolaris.com/download/smount">smount</a>.  Copy it somewhere in your path, and optionally make a copy or symlink called &#8220;sumount&#8221;.  Now you can rapidly mount and unmount multiple hosts.</p>
<p><span id="more-390"></span>List hosts:<br />
<code>smount</code></p>
<p>Mount two hosts:<br />
<code>smount server1 server2</code></p>
<p>Unmount all hosts:<br />
<code>smount -a</code></p>
<p>Help:<br />
<code>smount -h</code></p>
<p>Caution: this script is a dirty hack written in bash script.  It assumes that it is free to create /tmp/hostname, and it doesn&#8217;t play well on a multi-user workstations (I don&#8217;t want to mount in /tmp/tyler@host or something like that).  It also assumes that you have root access on your remote machines, so you probably want to use SSH keys.</p>
<p><code>smount</code> works on Ubuntu hardy.  However, I&#8217;ve found that the output of &#8220;<code>mount</code>&#8221; listings for FUSE filesystems changes from release to release.  So don&#8217;t be surprised if &#8220;<code>smount -a</code>&#8221; stops working when you upgrade Ubuntu.  I&#8217;ll try to keep an up-to-date copy here.</p>
<p>If you don&#8217;t know what you&#8217;re doing with mount or SSHFS, or if you&#8217;ve never totally destroyed a filesystem by accident (and are thus extremely cautious about doing it a second time), then DO NOT use this script.  No warranty or fitness for purpose is implied.  Your mileage may vary.  RTFM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/06/30/dirty-sshfs-hack-smount/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

