Re: [SLUG] ssh - localhost, mysql
On Sun, 2008-03-30 at 16:49 +1100, Sonia Hamilton wrote: On Fri, 28 Mar 2008 12:46:12 +0900, jam [EMAIL PROTECTED] said: Using a fresh install of Gutsy, and having apt-get install openssh-server he tunnels to me ssh -R 1200:localhost:22 [EMAIL PROTECTED] I then go back the tunnel to his machine ssh -p 1200 [EMAIL PROTECTED] 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 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] ssh - localhost, mysql
On Sun, 2008-03-30 at 18:48 +1000, Peter Hardy wrote: Easiest way is to turn off StrictHostKeyChecking for localhost. Add this to the end of your ~/ssh/config Host localhost StrictHostKeyChecking no Erm, that should be in ~/.ssh/config , natch. -- Pete -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] ssh - localhost, mysql
On Sun, Mar 30, 2008 at 4:49 PM, Sonia Hamilton [EMAIL PROTECTED] wrote: And a very OT question related to this. Whenever one connects to mysql via localhost, mysql will use the local socket rather than connecting via tcp. This obviously fubar's when one has got localhost connected to an ssh tunnel. Anyway around this? There's a mysql option 'protocol=tcp', but it doesn't appear to work. There's an angst filled bug post about it here: http://bugs.mysql.com/bug.php?id=31577 Another of those nitty-gritty details that gives me php deja-vu when I deal with MySQL - it treats the string localhost specially to use the unix-domain socket (which is probably faster, what with all the tcp/ip layers being left out of the equation). Using 127.0.0.1 explicitly instead of localhost overcomes this. --Amos -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] ssh - localhost, mysql
Sonia Hamilton wrote: 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). Just a guess you could assign one loopback addr to each distinct host and add to your /etc/hosts file: 127.0.0.101 tunhost1 127.0.0.102 tunhost2 127.0.0.103 tunhost3 127.0.0.104 tunhost4 127.0.0.105 tunhost5 : and arrange a separate and uniquely identifiable tunnel for each host. cheers rickw -- Rick Welykochy || Praxis Services || Internet Driving Instructor The best way to accelerate a PC is 9.8 m/s2 -- anon -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] ssh - localhost, mysql
On Fri, 28 Mar 2008 12:46:12 +0900, jam [EMAIL PROTECTED] said: Using a fresh install of Gutsy, and having apt-get install openssh-server he tunnels to me ssh -R 1200:localhost:22 [EMAIL PROTECTED] I then go back the tunnel to his machine ssh -p 1200 [EMAIL PROTECTED] 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). And a very OT question related to this. Whenever one connects to mysql via localhost, mysql will use the local socket rather than connecting via tcp. This obviously fubar's when one has got localhost connected to an ssh tunnel. Anyway around this? There's a mysql option 'protocol=tcp', but it doesn't appear to work. There's an angst filled bug post about it here: http://bugs.mysql.com/bug.php?id=31577 Thanks, -- Sonia Hamilton. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html