Search
Randomness (via klauster.com)
Thursday
Feb092012

OS X command line tricks for SSH and serial console connections

One of the things I love about Mac OS X is having the UNIX-like command line available via Terminal. I tend to just use Terminal for ssh and console access to routers and switches and the like. I do however like to have my output automatically logged to a text file, so I created TextExpander snippets to pipe output to the "tee" command with automatically set a date-stampted filename.

For SSH the looks like:

 ssh user@11.22.33.44 | tee /Users/klaus/ssh_logs/%Y-%m-%d-%H%M%S-ssh.txt

For console via USB to serial this becomes:

 screen /dev/tty.KeySerial1 | tee /Users/klaus/ssh_logs/%Y-%m-%d-%H%M%S-console.txt

Works pretty well so far

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
« Cisco goes 40 and 100 Gigabit Ethernet | Main | Walking the coastline - why project estimating is so hard. »