LJ Archive CD

Best of Technical Support

Various

Issue #107, March 2003

Our experts answer your technical questions.

SSH Won't Let Me In

I've installed Red Hat 7.3 and Red Hat 8.0, and when I use SSH I get an error that says “Connection Refused”. I can SSH on either machine to itself, but not from another machine. I've shut off the iptables service, and I've made sure that in /etc/xinetd.d/telnet the line disable=no is present. I've done a netstat -t | grep telnet and netstat -t | grep ssh, and they tell me that these services are running.

—Robert Haack, haack@nclack.k12.or.us

Check to be sure you can ping from one box to the other. If so, use a tool such as Nmap to verify that the port appears to be open end-to-end from one system to the other.

—Chad Robinson, crobinson@rfgonline.com

Look at /var/log/messages or /var/log/auth.log, which should show you why SSH is dropping the connection. Odds are your machine checks the reverse DNS mapping for your IP addresses and fails. One way to fix that is to populate /etc/hosts with the IP and hostnames of your machines.

—Marc Merlin, marc_bts@google.com

Check the /etc/hosts.allow and add sshd: ALL (or the IP address of the remote machine), because this is probably the reason you can connect locally but not from another machine.

—Mario Bittencourt, mneto@argo.com.br

SSH does everything Telnet does and more, and uses encryption, so you should leave the obsolete Telnet service off. Especially now that wireless networks are everywhere, you can't afford to reveal your password on the Net. You're right to use netstat to check for a listening SSH dæmon; however, you need to add the -a option. Do this:

$ netstat -at | grep ssh

And look for a line that looks like:

tcp  0 0 *:ssh  *:*   LISTEN

to see that sshd is listening for incoming connections.

—Don Marti, info@linuxjournal.com

If the SSH dæmon isn't running, start it with service sshd start or set it to come up automatically with:

chkconfig --level 2345 sshd on

—Felipe E. Barousse Boué, fbarousse@piensa.com

Modem Lights Won't Let Me Log Off

I can use the Modem Lights applet in Red Hat 8.0 to establish a PPP connection, but I can't use it for disconnecting. When I press the button a second time in order to disconnect, I'm once again confronted with the question “Do you want to connect?” If I answer No, nothing happens. If I answer Yes, I get disconnected and then connected again. How can I configure Modem Lights to do what it's actually supposed to do?

—Martin A. Boegelund, goblin@linuxmail.org

The default setup is the problem here. In the Preferences window for the Modem Lights applet, you will find an Advanced tab. Click it, then set the modem lock file appropriately. Try setting it to /var/lock/LCK..modem.

—Ben Ford, ben@kalifornia.com

Dual-Boot Hangs on Install

I just bought a Compaq Presario 1516US, and it came with Microsoft Windows XP. I partitioned the hard drive using Partition Magic, and when I put in the Red Hat 8.0 install CD it goes through the initial checking screen. When it gets to the following it hangs:

Partition Check:
 hda:

The cursor only blinks and nothing happens.

—Avran, idontlikemail@earthlink.net

This page has a useful tutorial on how to set up the Linux GRUB boot loader to handle a dual-boot system on machines that have Windows installed before Linux: www.geocities.com/epark/linux/grub-w2k-HOWTO.html.

—Felipe E. Barousse Boué, fbarousse@piensa.com

No repartitioning tool is 100% foolproof. All of them warn you to do a good backup first. Dual-boot is an inefficient way to work, because the application you need always seems to be on the other OS. But if you are going to dual-boot, make sure you have a good backup of your original OS and can restore it.

—Don Marti, info@linuxjournal.com

SMP System Won't Power Off

I am running Red Hat 8 with SMP. I have noticed that when I am running the kernel for a single processor the system powers off normally. If I select the SMP kernel during boot and then shut down, however, the system will shut down all processes and then produce the prompt to shut power off. My question is, why doesn't the system power off automatically when using SMP?

—Ron Oliva, rmoliva@citlink.net

Power off uses an APM call on Linux, but APM is unsafe in SMP mode, so Linux disables it. There is one command you give to the kernel to enable just enough APM to allow for power off. With newer kernels, add this to your append= line in lilo or grub:

apm=power-off

—Marc Merlin, marc_bts@google.com

PowerPC Motherboard?

My brother and I would like to build a PowerPC Linux computer. Do you have ideas on where we can get a motherboard to build a PPC machine? As far as PPC Linux distros, we have found Yellow Dog, Mandrake, SuSE, Rock, Holon, Debian, Vine and Gentoo. So there are a few Linux distros out there for the PPC.

—Rick Killingsworth, iamrlk@yahoo.com

Linux Journal just got a chance to play with a PowerPC ATX motherboard www.terrasoftsolutions.com/products/boxer. Check our next issue for our first look.

—Don Marti, info@linuxjournal.com

These links may be of interest to you and your brother; they contain info about Linux on PPC-based machines and compatible hardware: lppcfom.sourceforge.net and linuxppc64.org. This link is related to IBM 64-bit PPC hardware www.openppc.org, and this one talks about the open PPC architecture and includes some board diagrams/plans.

—Felipe E. Barousse Boué, fbarousse@piensa.com

Management without Monitor and Keyboard

I have been looking for x86-based servers (rackmount) with “lights-out management” abilities. I currently have several Sun V100 systems with this capability, but I'm forced to use Solaris. I've been able to get headless systems set up effectively using port redirection to a serial interface, but that doesn't fix the problem of an OS crash or a server that is hung and needs a power reset or to refresh the OS remotely.

—Ron Culler, ron@firelan.net

You need a hardware management card. Many of the major Intel architecture server vendors, including Dell, HP and IBM offer these cards as options on their servers. Essentially, these cards are similar to console redirection to the serial port, except they also allow you to do other things, such as remotely rebooting or completely turning off the server. Some of these cards even have network ports to do away with serial-based communications.

—Chad Robinson, crobinson@rfgonline.com

Some motherboards like the Intel 440GX have a second serial port that can be used for out-of-band management as you mention (hardware monitoring, reset and power cycle), and of course, you can also get BIOS redirection on the other port. To control the EMP (emergency management port), you can use VACM on Linux, vacm.sf.net.

—Marc Merlin, marc_bts@google.com

Middle Digital, Inc. makes ISA and PCI cards that give headless management functionality to most PC-architecture systems. Telnet to demo.realweasel.com for a live demo, or search the Linux Journal web site for “weasel”.

—Don Marti info@linuxjournal.com

Which GUI Toolkit?

I am making a program for running lab experiments and examining data, using arbitrarily long command strings with RPN-style syntax. Command recall and editing features, such as those provided by readline, are essential, and the program has to run on a graphics screen. I am leaning toward using svgalib because that will ease the transition from my DOS version and give greater efficiency in graph drawing, but I will consider other implementations. Can you give me some general ideas about how to get my command-line function?

—Bill McConnaughey, mcconnau@biochem.wustl.edu

Depending on which look and language you're most comfortable with, you're probably going to be best off with a modern GUI toolkit such as GTK+ or Qt. There is more code you're going to be able to borrow there. Also, it's going to be easier in the long run, as displays get bigger, if you ever want to be able to run your program and another program on the same screen at the same time. For example, Ricardo Fernández Pascual has written interesting-looking autocompletion functionality for the GtkEntry widget. His project is called EggEntry and looks general enough to support entering complex commands. See www.geocrawler.com/mail/msg.php3?msg_id=9808742&list=521.

—Don Marti info@linuxjournal.com

LJ Archive CD