<?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>blog.lundscape.com &#187; SSH</title>
	<atom:link href="http://blog.lundscape.com/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lundscape.com</link>
	<description>The Linux Journey</description>
	<lastBuildDate>Thu, 15 Apr 2010 20:06:18 +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>Bad Bash Sourcing</title>
		<link>http://blog.lundscape.com/2009/03/bad-bash-sourcing/</link>
		<comments>http://blog.lundscape.com/2009/03/bad-bash-sourcing/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 23:32:18 +0000</pubDate>
		<dc:creator>Zachary Lund</dc:creator>
				<category><![CDATA[Secure Shell]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[bashrc]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.lundscape.com/?p=53</guid>
		<description><![CDATA[A while back I switched such that my .bash_profile sources my .bashrc instead of the reverse. Based on a few sources, this seems to be the preferred approach. Today I decided to push those files to a few servers that haven&#8217;t been updated lately. I transferred my .bash_profile and then my .bashrc:
zac@dakara:~$ scp ~/.environment/bash/bash_profile lansky:~/.bash_profile
bash_profile [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I switched such that my .bash_profile sources my .bashrc instead of the reverse. Based on a few sources, this seems to be the preferred approach. Today I decided to push those files to a few servers that haven&#8217;t been updated lately. I transferred my .bash_profile and then my .bashrc:</p>
<pre>zac@dakara:~$ scp ~/.environment/bash/bash_profile lansky:~/.bash_profile
bash_profile                                  100%  120     0.1KB/s   00:00
zac@dakara:~$ scp ~/.environment/bash/bashrc lansky:~/.bashrc
lost connection</pre>
<p>What happened? My .bash_profile sources my .bashrc, but since I hadn&#8217;t yet replaced the .bashrc, it still sources my .bash_profile. That means infinite loop and that I am an idiot. SSH, rsync, and scp are all broken. There is no way to remove or replace either of those files without another account. I guess it&#8217;s time to open a support ticket at DreamHost.</p>
<p>The moral of the story is to always be careful how you source those files. I usually try to keep an SSH session open on the remote machine when I modify those files in case I break login, but this time I didn&#8217;t. A few searches didn&#8217;t reveal any solutions. I&#8217;d love to know if someone has a way of resolving this without access to another account on the remote machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lundscape.com/2009/03/bad-bash-sourcing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Typical Vim Reaction</title>
		<link>http://blog.lundscape.com/2009/02/the-typical-vim-reaction/</link>
		<comments>http://blog.lundscape.com/2009/02/the-typical-vim-reaction/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 05:35:26 +0000</pubDate>
		<dc:creator>Zachary Lund</dc:creator>
				<category><![CDATA[Rant]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[Ed]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Mutt]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.lundscape.com/?p=39</guid>
		<description><![CDATA[Every now and then I feel permitted to go on a rant. It&#8217;s unfortunate because this isn&#8217;t even a particularly good rant. Why do so many of my (instant messaging) conversations with others about Vim look like this?
Chris: do you use an IDE?
Chris: and if so which one?
Zachary: um, I generally use vim:-P
Chris: gah
Vim is [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then I feel permitted to go on a rant. It&#8217;s unfortunate because this isn&#8217;t even a particularly good rant. Why do so many of my (instant messaging) conversations with others about Vim look like this?</p>
<p><b>Chris:</b> do you use an IDE?<br />
<b>Chris:</b> and if so which one?<br />
<b>Zachary:</b> um, I generally use vim:-P<br />
<b>Chris:</b> gah</p>
<p><a href="http://www.vim.org/">Vim</a> is a great text editor. It&#8217;s a step up from <a href="http://cs.wellesley.edu/~cs249/Resources/ed_is_the_standard_text_editor.html">Ed</a> which is the standard text editor. I started using Vim five years ago. That was about the time that I discovered secure shell, and I started administering servers and other computers remotely. It turns out that Vim was the best text editor over a secure shell session, and since most of my machines ran Mac OS X at the time, Emacs was a terrible option. (I&#8217;m not really sure what you call Emacs on Mac OS X. You probably shouldnt&#8217; call it Emacs.) I limped along using very basic Vim functionality over secure shell for a while. Then I discovered a useful <a href="http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html">graphical tutorial</a> for Vim, and it became considerably more useful.</p>
<p>Now I use Vim because every other text editor or word processor is slower and requires the use of a mouse. (Gah!) I write most of my documents in <a href="http://www.latex-project.org/">LaTeX</a> using Vim. I read my email in <a href="http://www.mutt.org/">Mutt</a> and compose emails in Vim. I use Vim almost exclusively to edit code and configuration files on my workstations and servers which works well because it does a good job of syntax highlighting and smart indentation.</p>
<p>A few years ago, I wouldn&#8217;t have thought I&#8217;d be using Vim exclusively, and it was somewhat by accident that I switched, but now that I am using it, I would be unable to go back.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lundscape.com/2009/02/the-typical-vim-reaction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Flash on Mac OS X from the command line</title>
		<link>http://blog.lundscape.com/2009/02/install-flash-on-os-x-from-the-command-line/</link>
		<comments>http://blog.lundscape.com/2009/02/install-flash-on-os-x-from-the-command-line/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 04:59:20 +0000</pubDate>
		<dc:creator>Zachary Lund</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[hdiutil]]></category>
		<category><![CDATA[installer]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.lundscape.com/?p=25</guid>
		<description><![CDATA[My mother needed the latest version of Flash to view a web page. I decided this was a good opportunity to install the package from the command line over secure shell. She has a PowerMac G4 running Mac OS X 10.4. It turns out that the update didn't work, but I relearned a bit about some useful command line tools for Mac OS X.]]></description>
			<content:encoded><![CDATA[<p>My mother needed the latest version of Flash to view a web page. I decided this was a good opportunity to install the package from the command line over secure shell. She has a PowerMac G4 running Mac OS X 10.4. It turns out that the update didn&#8217;t work, but I relearned a bit about some useful command line tools for Mac OS X. I always start in the temp directory. Then I downloaded the installer and unzipped it. That&#8217;s all pretty straightforward.</p>
<pre>cd /tmp/
curl -O http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_osx_ub.dmg.zip
unzip install_flash_player_osx_ub.dmg.zip</pre>
<p>Next, I used &#8220;hdiutil&#8221; to mount the disk image and then changed to that directory.</p>
<pre>hdiutil attach Install\ Flash\ Player\ 10\ UB.dmg
cd /Volumes/Install\ Flash\ Player\ 10\ UB/</pre>
<p>Then I used &#8220;installer&#8221; to install the package specifying the package with &#8220;-pkg Adobe\ Flash\ Player.pkg&#8221; and the target volume with &#8220;-target /&#8221;.</p>
<pre>installer -verbose -pkg Adobe\ Flash\ Player.pkg -target /</pre>
<p>It will run through the installation and output some information. After that, I changed back to the temp directory. I initially tried using &#8220;umount&#8221; to unmount the disk image, but that is a bad idea because it doesn&#8217;t fully unmount the image. The better approach is to use the &#8220;hdiutil&#8221; again. I find the volume to unmount by using the &#8220;df&#8221; command. Once it is unmounted, I deleted the zip file and the disk image.</p>
<pre>cd /tmp/
hdiutil detach $(df | grep Flash | awk '{print $1}')
rm install_flash_player_osx_ub.dmg.zip
rm Install\ Flash\ Player\ 10\ UB.dmg</pre>
<p>Most applications for Mac OS X come in disk images, and many of those have package installers. This is a quick way to install software on a remote Macintosh or a way to automate installations with scripts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lundscape.com/2009/02/install-flash-on-os-x-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add an SSH Key to an SSH Agent on a Different Machine</title>
		<link>http://blog.lundscape.com/2009/02/add-an-ssh-key-to-an-ssh-agent-on-a-different-machine/</link>
		<comments>http://blog.lundscape.com/2009/02/add-an-ssh-key-to-an-ssh-agent-on-a-different-machine/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 04:40:49 +0000</pubDate>
		<dc:creator>Zachary Lund</dc:creator>
				<category><![CDATA[Secure Shell]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSH Agent]]></category>
		<category><![CDATA[SSH Key]]></category>

		<guid isPermaLink="false">http://blog.lundscape.com/?p=9</guid>
		<description><![CDATA[I recently discovered that I can add an SSH key to an SSH agent on a different machine. I find this useful because I am very protective of my SSH keys and prefer to keep them on my desktop (Dakara) and not on my laptop (Adria).]]></description>
			<content:encoded><![CDATA[<p>I recently discovered that I can add an SSH key to an SSH agent on a different machine. I find this useful because I am very protective of my SSH keys and prefer to keep them on my desktop (Dakara) and not on my laptop (Adria).</p>
<p>On Adria, you can see that I have no keys added:</p>
<pre>zac@adria:~$ ssh-add -l
The agent has no identities.</pre>
<p>I then secure shell to Dakara and forward my agent (-A) from Adria. I still have no keys added:</p>
<pre>zac@adria:~$ ssh dakara -A
zac@dakara's password:
No mail.
Last login: Mon Feb  9 17:30:49 2009 from adria.lund
zac@dakara:~$ ssh-add -l
The agent has no identities.</pre>
<p>Next, I add a key from Dakara to my agent on Adria:</p>
<pre>zac@dakara:~$ ssh-add
Enter passphrase for /home/zac/.ssh/id_dsa:
Identity added: /home/zac/.ssh/id_dsa (/home/zac/.ssh/id_dsa)
zac@dakara:~$ ssh-add -l
2048 27:81:f8:7f:38:75:6b:ce:95:e4:46:62:02:9c:84:bd /home/zac/.ssh/id_dsa (DSA)</pre>
<p>When I log out of Dakara, the key is still available on Adria:</p>
<pre>zac@dakara:~$ logout
Connection to dakara closed.
zac@adria:~$ ssh-add -l
2048 27:81:f8:7f:38:75:6b:ce:95:e4:46:62:02:9c:84:bd /home/zac/.ssh/id_dsa (DSA)</pre>
<p>Now my key is available on Adria without ever being on Adria. Even with physical access to my laptop, it would take a sophisticated hacker to steal my SSH key.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lundscape.com/2009/02/add-an-ssh-key-to-an-ssh-agent-on-a-different-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
