SSH suthentication problems thru (versus to) a given host

Cole Tuininga colet at code-energy.com
Fri Oct 4 16:33:58 EDT 2002


Well, I think I can explain the problem though I don't have a solution. 
When ssh connects to a remote host a part of the service it provides is
to help to guarrantee that the remote host is who you think it is.  This
is why, when you connect to a host for the first time, that it offers
you the remote host key and asks you to validate it.  The more paranoid
among us will actually do this rather than blindly saying, "Yeah sure. 
That's the right one."  *grin*

In any case, a host key is based off an IP.

When you choose to connect to a different port on Host B, it still
believes it is connecting to the same IP, just a different port. 
However, the SSH daemon on system C is reporting back a different host
key - hence ssh is basically trying to protect you from connecting to an
incorrect host.

Dunno how to get around this though...

> 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.  

-- 
"The net treats censorship as a malfunction and reroutes around it."
 -John Gilmore

Cole Tuininga
Lead Developer
Code Energy, Inc
colet at code-energy.com
PGP Key ID: 0x43E5755D





More information about the gnhlug-discuss mailing list