Unix Technical Forum

remote console

This is a discussion on remote console within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> OK I know I've posted something along these lines once before and I apologize in advance for that. I've ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 10:38 AM
Scott Eberl
 
Posts: n/a
Default remote console

OK I know I've posted something along these lines once before
and I apologize in advance for that.

I've been following the Nullmodem connection thread here in aol
and read all the pertinent links therein. Some of the information
was very enlightening but the configuration I want is slightly
different.

In my office at home are my 3 machines, 2 slackware 9.1 & 1 doze 2k.
The win2k & first linux box share my monitor/keyboard/mouse via a
two port KVM switch. The second linux box mostly used for DNS & a firewall/
router.

I can ssh into the third linux box from both my win2k box and the second
linux box. Ideally I would like from the second linux box to be able to
switch virtual terminals and have that be a direct console to the third
linux box through a serial cable. Right now I do have an old 15" monitor
connected to the third machine but it's taking up too much space. I do
makes frequent changes to it and need console access in case I kill the
network access on it.

Hopefully this posting makes more sense then my last and outlines what
I am trying to do better.

In short closing, for instance, [ALT]+F4 from CLI would switch to that
terminal which would be the console on the third linux box through
a serial cable.

Anybody help me out on this one?

--
If a man speaks in the woods, and
there is no woman there to hear him,
is he still wrong?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 10:39 AM
Alan Hicks
 
Posts: n/a
Default Re: remote console

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In alt.os.linux.slackware, Scott Eberl dared to utter,
> In short closing, for instance, [ALT]+F4 from CLI would switch to that
> terminal which would be the console on the third linux box through
> a serial cable.
>
> Anybody help me out on this one?


While I haven't done this with two slackware machines, it shouldn't be
that much different from doing it on the Sparc I've got. What you want
to to is run a console on the serial port. You'll need a serial cable
(null cable I believe) connected between the two machines.

Now take a look at /etc/inittab on your remote box.

- ----------------------------------------------------

# Local serial lines:
#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
#s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100

- ----------------------------------------------------

The above lines will start console gettys on your machine when you
restart init. Google around for more info on that. Basically on ttyS0
you are running /sbin/agetty at 9600 baud using vt100 terminal
emulation in run levels 1-5. This is nice, because it'll even let you
switch the machine to single user mode without dropping your
connection. Now let's look at /etc/inittab on your local box.

- ----------------------------------------------------

# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux

- ----------------------------------------------------

You can run anything you want on these tty's. You'll have to check the
syntax yourself, but the basic idea is to run a program that calls the
terminal across the serial connection. I've used "cu" for this in the
past to "call up" another system. "man 1 cu" All you should have to do
is replace the getty with the proper cu command to call up that remote
system and enjoy. Again, google around for this. This should be enough
to get you started.

man 5 inittab
man 1 cu

- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFAfyCiL3KiNGOqr6ERAqYzAJ4yA7QjvA571wyT77mqV5 D36s6XdwCgpIYr
a2g6DhFVYlYY7Y9dhT+6GQs=
=/BTG
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 10:39 AM
tm
 
Posts: n/a
Default Re: remote console



Scott Eberl wrote:
> OK I know I've posted something along these lines once before
> and I apologize in advance for that.
>
> I've been following the Nullmodem connection thread here in aol
> and read all the pertinent links therein. Some of the information
> was very enlightening but the configuration I want is slightly
> different.
>
> In my office at home are my 3 machines, 2 slackware 9.1 & 1 doze 2k.
> The win2k & first linux box share my monitor/keyboard/mouse via a
> two port KVM switch. The second linux box mostly used for DNS & a firewall/
> router.
>
> I can ssh into the third linux box from both my win2k box and the second
> linux box. Ideally I would like from the second linux box to be able to
> switch virtual terminals and have that be a direct console to the third
> linux box through a serial cable. Right now I do have an old 15" monitor
> connected to the third machine but it's taking up too much space. I do
> makes frequent changes to it and need console access in case I kill the
> network access on it.
>
> Hopefully this posting makes more sense then my last and outlines what
> I am trying to do better.
>
> In short closing, for instance, [ALT]+F4 from CLI would switch to that
> terminal which would be the console on the third linux box through
> a serial cable.
>
> Anybody help me out on this one?
>
> --
> If a man speaks in the woods, and
> there is no woman there to hear him,
> is he still wrong?
>
>
>

Ok, assuming the your first Linux machine has a serial port and your
second does as well you will need the following.
A null modem cable. (can be bought online from various sources or if you
can get to a Radio Shack, they carry them).
Null modem cables can also be made, and there are a few sources online
for the connections needed when connecting the two DB9 females (again
assuming that both PCs have DB-9 serial connections).

Connect the serial cable between the two pcs.

On your first machine you can connect to your serial port using minicom.
Minicom is a small serial program that allows you terminal access
through a serial port. Your primary serial port is usually ttyS0.


On the second linux box you will need to edit the /etc/inittab file.
Locate the section
#Local Serial Lines
#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100

and remove the '#' from in front of s1.



then do kill -s HUP Pidofinetd
where Pidofinetd is the PID of the inetd program shown when listing the
process using "ps -ef | grep inetd" (no quotes) on the command line.

When you fire up minicom on the first machine and configure it for 9600
8-1-N operation, you should be able to bring up the "login Xxxx:" prompt
from the second machine after hitting enter a few times.

Now there is a more elaborate way of connecting the two machines using
PPPD over the serial ports. This has the benifit of allowing you to
connect the two like they had ip address and everything.
You would be able to telnet , ssh , ftp just like a ethernet link.
There is information all over the net about pppd setup.

Tony

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 10:39 AM
jealous xmp
 
Posts: n/a
Default Re: remote console

>What you want
>to to is run a console on the serial port. You'll need a serial cable
>(null cable I believe) connected between the two machines.


I have a silly question. If serial console is used for admining servers a lot,
then how does one switch between servers? I know hot swapping on printer and
serial port is generally bad news.

Do you use a big ass A-B-C switch?

I think I will stick with ssh for infrequently used machines, but VNC sounds
nifty too.

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 10:39 AM
jealous xmp
 
Posts: n/a
Default Re: remote console

>On the second linux box you will need to edit the /etc/inittab file.
>Locate the section
>#Local Serial Lines
>#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
>
>and remove the '#' from in front of s1.


You can change the install iso contents like that, and have a headless install,
no?

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 10:39 AM
Menno Duursma
 
Posts: n/a
Default Re: remote console

On Fri, 16 Apr 2004 01:05:11 +0000, jealous xmp wrote:

>>On the second linux box you will need to edit the /etc/inittab file.
>>Locate the section
>>#Local Serial Lines
>>#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
>>
>>and remove the '#' from in front of s1.

>
> You can change the install iso contents like that, and have a headless install,
> no?


No, the install uses BusyBox. Try instead, something like this:
http://lists.routerlinux.com/piperma...ry/000133.html

--
-Menno.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008, 10:39 AM
Menno Duursma
 
Posts: n/a
Default Re: remote console

On Fri, 16 Apr 2004 01:02:54 +0000, jealous xmp wrote:

>>What you want
>>to to is run a console on the serial port. You'll need a serial cable
>>(null cable I believe) connected between the two machines.

>
> I have a silly question. If serial console is used for admining servers
> a lot, then how does one switch between servers?


You just connect a terminal-server to any serial-consoles.
(Servers, Routers, Switches, etc.)
And ssh into the terminal-server (used to be: telnet/rlogin).
So you can use "cu", "minicom", "seyon" or whatever you like,
provided the terminal-server can run that.

You can even run a SNMP agent on there whith a batch job "banner
grabing" the consoles for availability, and pull the status on that with
OpenView ( or better yet: OpenNMS ).

> I know hot swapping on printer and serial port is generally bad news.


Then don't do that :-)...

Seriosly though, you probably mean with some XON/OFF connection, where the
basterd gets "blocked" and you need to connect a terminal to feed the line
some ^Q or ^S a copple of times, before it's going again ... Use hardware
flow-control instead (thease ain't VAXen ja know?)

What has happned with PC hardware, is that LILO failed to respond ...
This has only /ever/ happened to me after "cold" reboot BTW.

> Do you use a big ass A-B-C switch?


I for one: don't and haven't. Couple of old PCs with SanDisk flash IDE
"drives", and some stuff like thease:
http://www.usenix.org/publications/l.../uselinux.html
(Yup that's Slack based alright.)

> I think I will stick with ssh for infrequently used machines,


Well, i use that as well...
But how do you get to the LILO prompt (to feed kernel parameters):
http://www.cyclades.com/products/2/ts_series

> but VNC sounds nifty too.


It's nice for "desktop take over" (for the internal helpdesk and
MS-Windows "servers"). For just about anything else i use X-Window. That
lets you run clients al over the network with output on your screen...
To access NT/2k/XP/2k3 desktop(s) from X you might consider "rdesktop":
http://www.rdesktop.org/

FYI: just like MS-DOS (and FreeDOS, and any other OS for that matter :-))
is able to run console over RS232C, as of 2003 MS-Windows can too ...

--
-Menno.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-19-2008, 10:39 AM
Alan Hicks
 
Posts: n/a
Default Re: remote console

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In alt.os.linux.slackware, jealous xmp dared to utter,
> I have a silly question. If serial console is used for admining servers a lot,
> then how does one switch between servers? I know hot swapping on printer and
> serial port is generally bad news.


I'm not entirely sure I understand the question. Serial is used
somewhat frequently, depending on your environment. People use serial
because they don't have keyboards, mice, or monitors, and you can't do
real-time boot up monitoring via a network login. What do you do when
your system won't boot? As for switching between serverrs quickly, you
typically don't have to do it. Serial is used to administer headless
machines, typically routers, firewalls, bridges, things that may not be
easy to administer fully via the network. You typically don't have to
touch these machines once they are up and in place.

> I think I will stick with ssh for infrequently used machines, but VNC sounds
> nifty too.


VNC sucks for remote administration. It's not terribly secure for one,
and it's slow across even broadband. vnc is doable on a LAN, but on a
lower speed WAN it's not a great way to administer a machine. ssh is
much better, and typically more secure.

- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFAf0j/L3KiNGOqr6ERAvt+AKCnoEsHruJT5sDs1FPusAi8KjWA/ACbBLZP
yY663mGDWBFJndC2gQgOWnE=
=JiUg
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-19-2008, 10:39 AM
Menno Duursma
 
Posts: n/a
Default Re: remote console

On Thu, 15 Apr 2004 16:19:57 -0500, Scott Eberl wrote:

> In short closing, for instance, [ALT]+F4 from CLI would switch to that
> terminal which would be the console on the third linux box through
> a serial cable.
>
> Anybody help me out on this one?


Have a look at "cu" (part of the "uucp" package) and "minicom", for the
client site - as others have pointed out. For the server site:
http://www.google.nl/groups?selm=pan...0deskt op.lan

And add "ttyS0" to /etc/securetty if you want root access.

I wouldn't set the port at a very hi baud rate, as it might get less
reliable then. Specially when using an UART with single byte Rx and Tx
buffers (ie: 8250 or 16450). With 16550A you should be ok to crank it up a
bit, you can check it out what you have with: "/sbin/setserial /dev/ttyS0"

And better to use hardware flow-control. Linux can do that using RTS/CTS
so if you're wireing your own cable, and want to use that, appart from pin
2 and 3 also cross pin 7 and 8 and enable it in software.

When in that case you're using twisted pair cable, you might want to use
pairs for Rx/Tx RTS/CTS (so if pin 2 is green, pin 3 would be green/white).
The RS232C standard doesn't define that, but it should make for a more
reliable link, none the less.

Have fun.

--
-Menno.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-19-2008, 10:40 AM
Menno Duursma
 
Posts: n/a
Default Re: remote console

On Thu, 15 Apr 2004 21:46:33 -0500, Alan Hicks wrote:

> In alt.os.linux.slackware, jealous xmp dared to utter,
>> I have a silly question. If serial console is used for admining servers a lot,
>> then how does one switch between servers? I know hot swapping on printer and
>> serial port is generally bad news.

>
> I'm not entirely sure I understand the question. Serial is used
> somewhat frequently, depending on your environment. People use serial
> because they don't have keyboards, mice, or monitors,


Since they are only needed on workstations anyway, ofcource. IBM XT/AT
clone hardware is very unique in that the BIOS is unable to run it's
console on a serial port. Hell, even my Apple LC IIs could do _that_!

The BIOS in the PC i use as my home "router" (headless) hangs at boot if i
fail to plug a keyboard into it. What i did there is, i just got me an old
broken KB, ripped out the wire with print, and plugged that in, it works :-).

> and you can't do real-time boot up monitoring via a network login.


Some newer models of (relatively hi end) 19" rack PC server hardware, can
run (BIOS/OS) console on a "management port" with Ethernet interface ...
But you're correct in that RS232C is the norm, some boxen even lack any
other way to configure them.

> What do you do when your system won't boot?


Yes, but if the functionality is critical, some other system should be
taking over it's task(s) automatically. What you'd still need serial line
console access for, is out-of-band management (ie: when the network "hangs").
-- Or if failover, doesn't work (for instance: in a split brain situation) --

> As for switching between serverrs quickly, you typically don't have to
> do it. Serial is used to administer headless machines, typically
> routers, firewalls, bridges, things that may not be easy to administer
> fully via the network.


At some of my former employers, we use(ed) SSH/telnet for administration,
SNMP for monitoring, and serial-console as a backup access method.
(With ISDN connected to terminal-server on remote locations.)

> You typically don't have to touch these machines once they are up and in
> place.


Yes. Up untill they fail. In weekend, at 3 AM. And faiover, fails too...

Even just haveing a null-modem cable laying around in any (and all)
equipment rooms, is _way_ better then not. You can try and helldesk any
person on-site to connect a laptop and fix stuff.

Better to have a POTS modem or ISDN connection ...

--
-Menno.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com