- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] ssh - localhost, mysql
- From: Peter Hardy <peter@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 30 Mar 2008 18:48:09 +1000
On Sun, 2008-03-30 at 16:49 +1100, Sonia Hamilton wrote:
> On Fri, 28 Mar 2008 12:46:12 +0900, "jam" <jam@xxxxxxxxx> said:
> > Using a fresh install of Gutsy, and having apt-get install openssh-server
> > he tunnels to me
> >
> > ssh -R 1200:localhost:22 ian@xxxxxxxxx
> >
> > I then go back the tunnel to his machine
> >
> > ssh -p 1200 ian@localhost
>
> Slightly OT question related to this. How would I prevent ssh
> complaining about changed ssh keys for localhost? (Because I regularly
> tunnel via localhost, but to different ips).
Easiest way is to turn off StrictHostKeyChecking for localhost. Add this
to the end of your ~/ssh/config
Host localhost
StrictHostKeyChecking no
You can also tool around with adding distinct HostKeyAlias names on the
ssh command line for each separate machine you want to log in to if
verifying host keys on the destination machine is important to you.
(the relevant man page for reading about these things is ssh_config(5))
--
Pete