Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

« Newer Snippets
Older Snippets »
Showing 1-3 of 3 total  RSS 

Mount SSH using MacFUSE

This will also list the voume in the Finder, thanks to the volname option (I think)

   1  mkdir -p ~/mnts/formandfx
   2  sshfs kmarsh@formandfx.com: ~/mnts/formandfx -oping_diskarb,volname=formandfx

Public key authentication

The 'key' here is the chmodding... OpenSSH requires proper permissions!

   1  ssh-keygen -t rsa -b 2048
   2  
   3  scp .ssh/id_rsa.pub user@remote.box:~
   4  ssh user@remote.box
   5  chmod 700 .ssh
   6  cat id_rsa.pub >> .ssh/authorized_keys
   7  chmod 600 .ssh/authorized_keys
   8  rm id_rsa.pub

Tunnel traffic through SSH

To connect to a specific port on a machine inside of an internal network via a different machine that can access it and has SSH enabled.

   1  
   2  ssh -C -L [port]:[internal hostname of machine]:[port] [public machine]


Then use whatever program to connect to 127.0.0.1, which SSH will forward on to the proper host.

Common ports include:
3389 for Microsoft Remote Desktop/Terminal Services
22 for SSH
« Newer Snippets
Older Snippets »
Showing 1-3 of 3 total  RSS