The Serial Console: A Front Door Worth Leaving Open - Page 2

By  Carla Schroder | Aug 18, 2004
Page 2 of 2   |  Back to Page 1
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Continued From Page 1

Now go to the "terminal" machine, your trusty laptop or whatever, and set up Minicom. You'll see this beautiful ASCII menu:

# minicom -s

------[configuration]-------
| Filenames and paths      
| File transfer protocols 
| Serial port setup        
| Modem and dialing       
| Screen and keyboard   
| Save setup as dfl 
| Save setup as..         
| Exit          
| Exit from Minicom 
----------------------------

Select "serial port setup". Modern modems are pretty good at auto-negotiating connection speeds. Start out conservatively, then you can bump it up if you like and see what happens. Select the letter of the option you want to change, then hit return to get back to "Change which setting?":


-------------------------------------------
| A -    Serial Device      : /dev/ttyS0 
| B - Lockfile Location     : /var/lock 
| C -   Callin Program      :      
| D -  Callout Program      : 
| E -    Bps/Par/Bits       : 9600 8N1
| F - Hardware Flow Control : No
| G - Software Flow Control : No 
|                                    
|    Change which setting? 
-------------------------------------------

Next, select the "Modem and dialing" option, and make sure the "Init string" and "Reset string" settings are blank. Finally, select "Save setup as dfl" to make this the default, and then "Exit" from Minicom.

Making the Connection with Minicom

Now take your nice new null-modem cable and connect the two machines. Then fire up Minicom on the "terminal":

# minicom

Welcome to minicom 2.1

OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Nov 12 2003, 19:21:57

Press CTRL-A Z for help on special keys

headless login:

Login, and there you are. What can you do? Anything that you can do from any Linux command shell.

To exit, hit Ctrl+A, Z, X.

Serial Annoyances

Permissions inconsistencies are going to bite you a lot. By default on most Linuxes, root cannot login over a tty. So you'll have to edit or create /etc/securetty on your server, and add this line:

ttyS0

Non-root users can't use tty ports. The quick n dirty fix is this:

# chmod o+rw /dev/ttyS0

The long-term fix is set up sudo users for /dev/ttyS0.

A third show stopper nuisance is having mingetty. mingetty is strictly for logging into to local virtual terminals. It does not support serial lines. You want agetty, getty, or mgetty, which can be obtained from the usual Linux sources. If your system is using mingetty, don't remove it. Just be sure to edit /etc/inittab to point to agetty, getty, or mingetty.

Resources

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter
Helpful Links
  • Yankee Group Mobile WAN Optimization Report

    Mobile work continues to evolve. Your organization must keep up with the demands of its mobile workforce. This report introduces the concept of mobile WAN optimization and provides three case studies including RCM, PRTM and Einstein that highlight how this emerging technology can help IT departments achieve what previously appeared to be conflicting goals. Read >

  • Network Security Resources

    More threats than ever before pose a danger to today's enterprise network. Get the latest tips and intel on the newest risks in our guide to network security resources. Read >

  • Extreme Savings: Cutting Costs with WAN Optimization

    Did you know it's possible to cut IT costs without impacting day-to-day IT operations? In fact, when you download this whitepaper from Riverbed on cost-savings through WAN optimization, you'll discover how businesses of all different sizes have realized a return on investment in just a few months through significant hard cost savings in areas such as bandwidth reduction and IT consolidation. It's called Extreme Savings and its only from Riverbed. Read >