SSH suthentication problems thru (versus to) a given host

Michael O'Donnell mod+gnhlug at std.com
Fri Oct 4 15:58:39 EDT 2002


Let's say I have the following setup, similar to one
recently described by pll:

 +--------+          +--------+          +--------+
 |        |          |        |          |        |
 |        |          |        |          |        |
 |   A    |->->->->->|    B   |->->->->->|   C    |
 |        |          |        |          |        |
 |        |          |        |          |        |
 +--------+          +--------+          +--------+

A and C can't see each other; B can see everybody.

I can SSH from A to B just fine, and I can SSH from B
to C just fine.  And now that I've rigged B to forward
all inbound traffic on port 6789 to C:22 I can even
SSH from A to C.  Cool.

The problem is that SSH apparently fails to distinguish
between SSH connecting TO a system versus THRU a system;
when I switch (between saying

   ssh         B           # Connecting  TO  system B

...and

   ssh -p 6789 B           # Connecting THRU system B

SSH seems not to be able to understand to difference;
it complains to me thus:

   Warning: the RSA host key for B differs
   from the key for IP address '11.22.33.44'

...and then it goes on to describe the line in my
known_hosts file that it's unhappy about.  

My current workaround is to remove that line in
the known_hosts file, obviously a stupid approach.

Suggestions?




More information about the gnhlug-discuss mailing list