<?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>The Sapience Society &#187; OS X</title> <atom:link href="http://blog.lococobra.com/tag/os-x/feed" rel="self" type="application/rss+xml" /><link>http://blog.lococobra.com</link> <description>The advice of a self-proclaimed technological ninjician</description> <lastBuildDate>Thu, 08 Dec 2011 19:41:17 +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>Installing Linux on a Mac, the hard way</title><link>http://blog.lococobra.com/installing-linux-on-a-mac-the-hard-way</link> <comments>http://blog.lococobra.com/installing-linux-on-a-mac-the-hard-way#comments</comments> <pubDate>Fri, 30 Jan 2009 20:36:01 +0000</pubDate> <dc:creator>Jeff</dc:creator> <category><![CDATA[Adventures in Macland]]></category> <category><![CDATA[dual boot]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[Mac]]></category> <category><![CDATA[OS X]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://blog.lococobra.com/?p=16</guid> <description><![CDATA[I was going to make a post about this, but honestly I think this will be more useful. It is possible. Don't do it. The end. I tried it, and successfully booted Ubuntu 8.10 on my MacBook Pro. I'm sure if you look around you could find the same guide I used, but here's the [...]]]></description> <content:encoded><![CDATA[<p>I was going to make a post about this, but honestly I think this will be more useful.</p><p>It is possible.<br
/> Don't do it.<br
/> The end.</p><p>I tried it, and successfully booted Ubuntu 8.10 on my MacBook Pro. I'm sure if you look around you could find the same guide I used, but here's the verdict: It just didn't work very well. Drivers were buggy and mouse control was awful. I just didn't see any reason to keep it around, especially since OS X is such a close relative of Linux anyways. Unfortunately when I tried to remove it, the swap partition simply wouldn't budge. Trust me, I tried every possible method for reformatting that partition, but no dice. Long story short, I ended up reformatting the whole hard drive just to get everything back together. Many hours sunk, no progress made, NOT WORTH IT! You'll be better off putting it on your old windows box or just using virtualization.</p><p>If you tried it yourself, why don't you comment here on how it went.</p><div
class="shr-publisher-16"></div>]]></content:encoded> <wfw:commentRss>http://blog.lococobra.com/installing-linux-on-a-mac-the-hard-way/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Connect to Windows Samba Shares via SSH Tunneling from Mac OS X</title><link>http://blog.lococobra.com/how-to-connect-to-samba-shares-over-the-internet-via-ssh-from-mac-os-x</link> <comments>http://blog.lococobra.com/how-to-connect-to-samba-shares-over-the-internet-via-ssh-from-mac-os-x#comments</comments> <pubDate>Fri, 30 Jan 2009 20:13:53 +0000</pubDate> <dc:creator>Jeff</dc:creator> <category><![CDATA[Adventures in Macland]]></category> <category><![CDATA[connect]]></category> <category><![CDATA[file sharing]]></category> <category><![CDATA[Leopard]]></category> <category><![CDATA[Mac]]></category> <category><![CDATA[OS X]]></category> <category><![CDATA[Samba]]></category> <category><![CDATA[Share]]></category> <category><![CDATA[SMB]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[tunnel]]></category> <guid
isPermaLink="false">http://blog.lococobra.com/?p=6</guid> <description><![CDATA[Chances are if you are seeing this, you've tried quite a bit but it hasn't worked. Look no further. If you are seeing this and haven't been researching it, then this should still be enough info to get a good start. First, here's the point: Using windows file sharing (Samba/SMB) is a good way to [...]]]></description> <content:encoded><![CDATA[<p>Chances are if you are seeing this, you've tried quite a bit but it hasn't worked. Look no further. If you are seeing this and haven't been researching it, then this should still be enough info to get a good start.</p><p>First, here's the point: Using windows file sharing (Samba/SMB) is a good way to access your files across your home network, but don't even think about trying it over the internet. In order to access SMB shares across the internet you're going to need to get creative. A method which works reasonably well is using a zero-configuration VPN program such as Hamachi, Remobo, Wippen, etc. to create a virtual lan connecion, thus fooling your computer into connecting like you were on the same lan. That works, but in my experience it isn't very reliable, it has limitations, it has overhead, and it means you have to have that ZCVPN client on both ends. So here's my solution, skip the program, jump straight to the solution. If you use an SSH tunnel to connect to your computer, you can access your SMB shares, you can use VNC to view your screen, or do just about anything that uses a port on your host computer. The best part about it is, once you have it up and running, it's really simple to use!<br
/> <span
id="more-6"></span><br
/> Note: This post will assume that your "server" machine is running windows and your "client" machine is running Mac OS X Leopard.</p><p>Here's how to do it:</p><p>1. Enable file sharing on your host computer (I'm going to assume this is running Windows). This will allow your files to be shared across your local network. If you don't know how to do that, there's a very good guide <a
href="http://lifehacker.com/software/mac-os-x/how-to-mount-a-windows-shared-folder-on-your-mac-247148.php">Here</a>.</p><p>2. (Optional) Disable simple file sharing and edit the permissions on your shares so that the shares are password protected. You only need to do this if you don't want just anyone on your local network to be able to access your files. (Google it)</p><p>3. Install an SSH server on your host computer, I'd recommend <a
href="http://www.freesshd.com/">freeSSHd</a>. This will allow your to create a secure connection between your computers. I'd suggest freeSSHd because it's free and much easier to use than many of the alternatives (OpenSSH/Cygwin).</p><p>4. On the SSH tab in the freeSSHd settings, change the port to whatever port you want, I'll be using 12345 in my examples. I'd recommend something in between 10000 and 50000 so that a network scanner is less likely to pick up the port.</p><p>5. On the Users tab in freeSSHd, add a user with the username and password of your choice, set your password as "Password stored as SH1 hash".</p><p>6. On the Tunneling tab in freeSSHd, enable local and remote port forwarding.</p><p>7. Test your SSH server to make sure you can connect to it using a computer on the same network as the SSH server.  You will need the local IP of the SSH server for this step you can find it using <a
href="http://boshdirect.com/blogs/tech/find-local-ip-address.html">This</a> guide.</p><p>To test it from your mac machine:</p><ol><li>Open the Terminal (Applications/Utilities/Terminal)</li><li>Use the command <em>ssh -p port username@hostip</em> (Example: ssh -p 12345 lococobra@192.168.0.2)</li></ol><p>8. Enable port-forwarding on your router to your SSH server at the port you used - Follow one of the guides for your router <a
href="http://portforward.com/english/routers/port_forwarding/routerindex.htm">Here</a> but use the port for SSH (12345)</p><p>9. (Optional) Set up an automatic DNS server for your host computer, you can set that up <a
href="http://www.no-ip.com/services/managed_dns/free_dynamic_dns.html">Here</a> for free. I'd really suggest you do this, its very useful! Once you have that set up, install the <a
href="http://www.no-ip.com/downloads.php">No-IP Dynamic Update Client</a> so that your DNS always matches your dynamic IP.</p><p>10. Test your SSH connection via the port forward. This is almost exactly the same as before, except instead of using the IP you got from ipconfig, use your global IP (or the DNS you set up in step 9). You can find your global IP <a
href="http://www.whatismyip.com/">Here</a>. Example: <em>ssh -p 12345 lococobra@myDNS.hopto.org</em></p><p>Now that we have all that set up, we're almost done. What we're going to do is connect via SSH and forward the SMB ports from our host computer to our client. This will allow you to access your shares remotely. It works because your ssh/smb server will think that it's directly connected with your client computer, when in fact the connection is all handled through SSH. The tricky part is, OS X Leopard will not allow you to do this. If you forward the SMB ports from the server to client computer, then the client will think that it's connecting to itself, and so Leopard will deny the connect. In order to defeat this we're going to have to work some magic.</p><p>11. Set up an alias for your loopback connection (localhost/127.0.0.1) on your Mac. This will fool your computer into thinking it's connecting to an external IP. This command needs admin privileges, so you have to use sudo. The command is:</p><blockquote><p><code>sudo ifconfig lo0 127.0.0.2 alias up</code></p></blockquote><p>This will create a temporary alias for your loopback connection which will stay active until the computer is restarted.</p><p>12. Edit the all users configuration file for your SSH settings so that you can connect quickly without setting it up each time.</p><ol><li>Open the Terminal and run <em>sudo pico /etc/ssh_config</em></li><li>Enter the following text above the line that says " #Host *", change the user and port to the ones you have used in your SSH configuration.</li></ol><blockquote><p><code>Host AliasForHost<br
/> HostName hostip<br
/> Port 12345<br
/> User YourUserName<br
/> ServerAliveInterval 200<br
/> ServerAliveCountMax 3<br
/> LocalForward 127.0.0.2:139 127.0.0.1:139<br
/> LocalForward 127.0.0.2:445 127.0.0.1:445</code></p></blockquote><p>Keep in mind that you can add any number of ports to this list. For example, if you want to connect to VNC, add 5900 to that list. Then to use VNC, connect to 127.0.0.2:5900.</p><p>Hit control + x, Y, and enter to save the file. Since we're saving it as a dotfile (there's a dot at the beginning) you won't be able to see it. If you need to edit it again, you can do it through pico the same way.</p><p>13. Initiate the SSH connection with your host computer using the host alias we set up before.</p><blockquote><p><code>sudo ssh AliasForHost</code></p></blockquote><p>14. Connect to the Samba share. Open a Finder window and hit command+ k to open a Connect to Server windows. For the server address, use:</p><blockquote><p><code>smb://127.0.0.2</code></p></blockquote><p>Now click Connect, and if everything went well you should be prompted with a window to enter your Login credentials for the server machine!</p><p>Wow, that was complicated, but at this point it doesn't need to be. Here's a little AppleScript I came up with to automate the connection. (Don't worry about running the ifconfig over and over, it won't hurt anything)</p><blockquote><p><code>set Command to "sudo ifconfig lo0 127.0.0.2 alias up; sudo ssh AliasForHost"</code></p><p>tell application "Terminal"<br
/> if (count of windows) is 0 then<br
/> do script Command<br
/> else<br
/> do script Command in window 1<br
/> end if<br
/> activate<br
/> end tell</p></blockquote><p>You can save that script as an application using the AppleScript Script Editor and run it to automatically run those commands.</p><p>I know for most people that post was probably really confusing but I tried! If you need help please comment or something. I'll get back to you.</p><p><strong>Edit</strong>: Take a look at Fredrik's script in the first comment for  an even more automated solution for connecting and mounting.</p><p><strong>Edit2</strong>: I found a much more efficient way to actually initiate the connection using a host alias, take a look at the part about the ssh_config file</p><div
class="shr-publisher-6"></div>]]></content:encoded> <wfw:commentRss>http://blog.lococobra.com/how-to-connect-to-samba-shares-over-the-internet-via-ssh-from-mac-os-x/feed</wfw:commentRss> <slash:comments>19</slash:comments> </item> </channel> </rss>
