Archive

Posts Tagged ‘SSH’

Use MacFUSE and Macfusion SSH Mount

June 7th, 2009 No comments

AppleConstantly needing to edit files on remote systems? Find it tasking and annoying to edit localy and upload via ftp or ssh? Want to use your favorite editor to edit the files on the remote system rather than relying on the remote ‘vi’ or ‘nano’? MacFUSE and Macfusion can be a very powerful tool that can remedy all of the above. Below is a quick tutorial on how to setup and use it.

Download and install: MacFUSE and Macfusion

Enable Macfusion to run at startup and enable the menu item for quick mounting and remote file system access. Run Macfusion –> Preferences –> General –> ‘When I login, start’ –> ‘the macfusion agent’ and ‘the macfusion menu item’.

After reboot you will see a new Icon in your Menu Bar. If you select it, it will look something like…

Here you can see your various options and current mounted file systems. To setup a connection to a server, ‘Macfusion Menu Item’ –> ‘Open Configuration …’ –> ‘+’ –> Select connection type: SSHFS/FTPFS.

Configure the Connection Name, Hostname, User Name, Password.

Whalla! You should be all setup and able to edit and browse the files as if it was a local file system. Works great with your favorite editor (in this case TextMate).

TextMate tweak to prevent remote meta data files that can slowly make a mess out of the file system. Copy and paste the below line in the command line.

defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1

TextMate Manual on Saving Files. TextMate Manual

To view hidden files via finder add the following line on the command line.

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Original Source: http://minimaldesign.net/articles/read/remote-textmate-projects

SSH Proxy (how-to)

May 23rd, 2009 No comments

TerminalSSH Proxying is one of my every day tools. Sitting at work with a Barracuda firewall looking, snooping, and possibly blocking everything that I do. Hanging at a coffee shop when you see a suspicious person most likely snooping your information out of the air. In the first case I’m primarily just trying to get around a hurdle. In both cases I want my traffic encrypted and hidden from 3rd parties.

What is SSH Proxying?
This is a means of setting up a Secure Shell (SSH) and then piping your various web requests across this pipe or tunnel.

I’ve got 2 different SSH Proxies that I use daily.

Web Traffic – SSH Tunnel/Proxy:

ssh -CqN -D 8080 [username]@[hostname]

For above tunnel I’m using the following:

-D: bind port – in this case 8080 locally
-C: enables compression
-q: quiet mode (suppresses any warnings)
-N: don’t execute any remote commands

The -CqN are just some bells and whistles I use for the connection but not required. Please see below on configuring your browser to use the newly established SSH Tunnel.

Various other traffic (IRC, VNC, Torrent, etc…) – SSH Port Forwarding

ssh -L 6667:irc.[hostname]:6667 [username]@[hostname]

In this example, I’m binding a local port (-L 6667) to a remote boxes port (6667) through the server I have SSH’ed into. You can also add some of the bells and whistles from the web proxy to this one as well. Please see below for using this port forward with and IRC client.

Configuring the Browser:
The general idea (for Firefox) is to go to: Preferences –> Advanced –> Network –> Connection –> Settings. Select ‘Manual proxy configuration’. Set SOCKS Host: localhost Port: 8080. Click OK/Save and you should be good to go.

Here’s a screen shot of my settings:

Firefox SSH Proxy Config

Categories: Linux, Mac, Security, Unix Tags: , , , , , ,