incorrect "host key changed" for multi-sshd localhost
From: Ian! D. Allen (idallen@freenet.carleton.ca)
Date: 11/16/02
- Next message: David J: "Easy question on authorised_keys and AuthorisedKeysFile"
- Previous message: Nico Kadel-Garcia: "Re: fork a background process und ssh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: idallen@freenet.carleton.ca (Ian! D. Allen) Date: Sat, 16 Nov 2002 08:53:09 +0000 (UTC)
I have several machines at my College that set up reverse ssh tunnels
back to themselves via "ssh -R 123x:localhost:22 idallen.com". This means
idallen.com effectively has an sshd listening on several 123x ports.
On idallen.com, the first time I connect to one of these localhost ports,
e.g. "ssh -p 1231 localhost", ssh puts an entry in .ssh/known_hosts for
"localhost"; but, of course, the key that is put there is the host key
for one of my *remote* machines, listening on port 1231.
The second time I connect to one of these localhost ports, but a
different port (different remote machine), e.g. "ssh -p 1232 localhost",
ssh complains that the host key for "localhost" has changed and refuses
to do various things.
In fact, neither of these host keys is the actual "localhost" key -
both host keys are keys of remote sshd on remote machines at the College.
I have written a silly shell script that removes the "localhost" key
before calling ssh; but, surely there is a better way to get ssh to
record different keys on different ports as different entries in the
known_hosts file? (Or perhaps ssh needs to record host key using
something other than the host name on the command line...)
Ideas?
-- -IAN! Ian! D. Allen Ottawa, Ontario, Canada idallen@ncf.ca Home Page on the Ottawa FreeNet: http://www.ncf.ca/~aa610/ College professor at: http://www.algonquincollege.com/~alleni/ Board Member, TeleCommunities CANADA http://www.tc.ca/
- Next message: David J: "Easy question on authorised_keys and AuthorisedKeysFile"
- Previous message: Nico Kadel-Garcia: "Re: fork a background process und ssh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|