Posts tagged ‘OS-X’

SSH Tips

SSH is one of those things I use every day, and maybe what I use most throughout the day. These are either things I didn’t know (escape sequences), or haven’t looked into before.

To get to the SSH escape sequences, you need a new line, followed by ~ and ?. That’s a newline (return), followed by a tilde and a question mark. This is what you get

Supported escape sequences:
  ~.  - terminate connection (and any multiplexed sessions)
  ~B  - send a BREAK to the remote system
  ~C  - open a command line
  ~R  - Request rekey (SSH protocol 2 only)
  ~^Z - suspend ssh
  ~#  - list forwarded connections
  ~&  - background ssh (when waiting for connections to terminate)
  ~?  - this message
  ~~  - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

There are a lot of interesting things you can do with this. My favorite being if you ssh to host1.cainmanor.com then ssh to host2.cainmanor.com and then ssh to host3.cainmanor.com and host3.cainmanor.com locks up, you can newline ~~~. and the third session will be closed.

But wait!! There’s more
Continue reading ‘SSH Tips’ »

Force your Mac to boot into 64 bit mode

UPDATE…

Not all Macs that are capable of booting a 64 bit kernel will boot the 64 bit kernel. The Mini is one of those… (This is from Apple.) Getting those machines NOT on the list to boot into a 64 bit kernel is possible, but it’s beyond the scope of this article (it involves editing your boot.efi.)

Mac Pro (Early 2009)
Mac Pro (Early 2008)

Mac Pro (Original)  
iMac (Early 2009) 
iMac (Early 2008) 
iMac (earlier models)  
Mac mini (all models)  

Continue reading ‘Force your Mac to boot into 64 bit mode’ »

Convert upper case to lower case

cat /tmp/blah | tr '[A-Z]' '[a-z]'

and to convert from lower case to upper case

cat /tmp/blah | tr '[a-z]' '[A-Z]'

NMAP tip

To scan an entire subnet for OS fingerprints and output to a grep-able file

nmap -oG XXX.txt -O 10.10.XXX.0/24

OS-X Navigation tips

When in an open/save dialog box, or in the Finder,  pressing Command + Shift + G will allow you to directly type in a directory path.

When in an open/save dialog box, you can drag a folder into the dialog box to change to that directory.