Re: [CentOS] connecting linux console using serial port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Quoting israel.garcia@xxxxxxxxxxxx:

Just terminal access -> I want to login in my linux server connecting
through the modem connected in /dev/ttyS0

Not sure if this is complete.

Install mgetty if not already present on your system.

Go to /etc/mgetty+sendfax directory. If you have CallerID feature on your phone line (and you should get it if you don't have it yet), edit dialin.config file and add telephone numbers you will be dialing from. At least this will prevent clueless script-kiddies from getting login prompt on your modem line. I know that some of my modems get regullary probed from strange phone numbers (and those are dedicated modem lines -- no voice calls on them, not listed in white pages, too often on too many lines to be the simple case of wrong number).

While there, check login.config file. If you don't want PPP on it, make sure /AutoPPP/ is commented (should be default). Make sure "* - - /bin/login @" line is not commented (should be last line in the default config file). That's the line that will give you login prompt.

Edit /etc/inittab and add something like this:
s0:2345:respawn:/sbin/mgetty -D -n 2 -s 115200 /dev/ttyS0

The "-n 2" tells mgetty to pick up the phone after second ring. You need to wait till second ring because telephone company sends CallerID information between first and second ring. If you configured mgetty to answer after first ring, it would never get CallerID information.

Execute "telinit q" as root (this tells init process to reread inittab file).

Configure and connect modem and you should be set to go. I do not recommend allowing root to login directly from modem line (could be configured by editing /etc/securetty and /etc/security/access.conf files if needed, but not wise idea). Login as normal user, than su to root.

--
NOTICE: If you are not intended recipient, you are hereby notified
that by reading this message you agreed not to disturb frogs during
mating season.  For more info, visit http://www.8-P.ca/

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux