Re: [Boston.pm] OT - cannot SSH into Redhat box

2004-04-20 Thread John Abreau
On Tue, 2004-04-20 at 21:32, Ranga Nathan wrote:

 I installed Redhat server (Enterprise) on a box but I can not SSH into
 the box. The sshd is running and I can ssh from within the box but not
 from outside. /etc/hosts.allow and /etc/hosts.deny are both empty.
 There is no other firewall I can find there. HTTP connection is fine.
 I checked sshd_config and that looks clean (i.e no blocking entries).
 I remember going through a similar situation a couple of years ago and
 have forgotten what I did.
 
 Anything I missed out?

The first thing I'd check is if iptables is allowing traffic on 
port 22. Look at /etc/sysconfig/iptables, and see if there's a 
line similar to this: 

-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 22 --syn -j ACCEPT

-- 
John Abreau / [EMAIL PROTECTED] / http://www.abreau.net / GnuPG-Key-ID D5C7B5D9
GnuPG-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99



signature.asc
Description: This is a digitally signed message part
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] OT - cannot SSH into Redhat box

2004-04-20 Thread Andrew M. Langmead
On Apr 20, 2004, at 9:32 PM, Ranga Nathan wrote:

I installed Redhat server (Enterprise) on a box but I can not SSH into 
the box.


I'd start with setting LogLevel DEBUG in /etc/sshd_config, restarting 
sshd, and then running the ssh client on the other machine with the 
-v flags. the ssh commands logging can be rather verbose, but when 
you see negative sounding phrases like method disabled or Failed, 
things are going wrong and there are positive phrases like succeeded 
or accepted then things are going right.



Maybe the Easter Bunny is just Santa Claus in an rabbit costume. A 
rabbit can't go to everyone's house in one night. -- Samantha 
Langmead, age 6.

___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] OT - cannot SSH into Redhat box

2004-04-20 Thread Kenneth A Graves
On Tue, 2004-04-20 at 21:32, Ranga Nathan wrote:
 I installed Redhat server (Enterprise) on a box but I can not SSH into the 
 box. The sshd is running and I can ssh from within the box but not from 
 outside. /etc/hosts.allow and /etc/hosts.deny are both empty. There is no 
 other firewall I can find there. HTTP connection is fine. I checked 
 sshd_config and that looks clean (i.e no blocking entries). I remember 
 going through a similar situation a couple of years ago and have forgotten 
 what I did.
 
 Anything I missed out?

Check /var/log/secure for error messages.

If you are trying to ssh in as root (instead of as yourself, then using
su), then there is a config line in sshd_config you'll have to change.

If available, try a different ssh client.

Instead of running sshd as a daemon, run it in debug mode.  Run the ssh
client in debug mode as well.  Somewhere in the noise might be something
useful.

--kag


___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


[Boston.pm] Non-matching regexp doesn't set $1 to undef. Should it?

2004-04-20 Thread Ron Newman
If I try to match a regular expression that contains parentheses, and 
the match fails, shouldn't $1 be set to undef rather than keeping 
whatever value it had before?   The following program demonstrates what 
looks to me like very strange behavior.   Adding local $1 = undef; in 
the position shown did not change this behavior.

---
#!/usr/bin/perl -w
use strict;

sub1(There are 100 words.);

sub sub1 {
  my $s = shift;
  $s =~ /There are (\d+) words./;
  print sub1 (before call): \$1=$1\n;
  sub2($s);
  print sub1 (after call): \$1=$1\n;
}
sub sub2 {
  my $s = shift;
  # local $1 = undef;  --- Adding this has no apparent effect.
  print sub2 (before match): \$1=$1\n;
  $s =~ /There are ([a-z]+) words./;
  print sub2 (after match): \$1=$1\n;
  }
--
The output:
sub1 (before call): $1=100
sub2 (before match): $1=100
sub2 (after match): $1=100
sub1 (after call): $1=100
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Non-matching regexp doesn't set $1 to undef. Should it?

2004-04-20 Thread Linda L. Julien

   From: Ron Newman [EMAIL PROTECTED]
   Date: Tue, 20 Apr 2004 23:06:12 -0400

   If I try to match a regular expression that contains parentheses, and 
   the match fails, shouldn't $1 be set to undef rather than keeping 
   whatever value it had before?

Nope.  It will still have its old value, so you need to check whether
the match succeeded:

   if ($s =~ /There are (\d+) words./) {
   print sub1 (before call): \$1=$1\n;
   } else {
   print I didn't match anything\n;
   }

Linda
___
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm