Re: mysql connection through ssl tunnel

2008-10-22 Thread John Almberg
Answering my own question (probably the best way)... I solved this problem by figuring out how to execute the command inside the rc script as a non-root user. Like so: autossh_start() { echo "${command} ${command_args}" su admin -c "${command} ${command_args}" echo "started autossh" } Thi

Re: mysql connection through ssl tunnel

2008-10-22 Thread Matthew Seaman
John Almberg wrote: Now I just need to figure out how to start it on reboot, but that is something I've been meaning to learn, anyway, so I don't mind. I hope you guys will bear with me just a little more... I have spent the day trying to figure out how to create an rc script for autossh. Ver

Re: mysql connection through ssl tunnel

2008-10-22 Thread John Almberg
Now I just need to figure out how to start it on reboot, but that is something I've been meaning to learn, anyway, so I don't mind. I hope you guys will bear with me just a little more... I have spent the day trying to figure out how to create an rc script for autossh. Very cool, and not as

Re: mysql connection through ssl tunnel

2008-10-21 Thread Bernt Hansson
John Almberg said the following on 2008-09-23 15:54: I have two FreeBSD machines. One is a application server, the other a database server running mysql. These machines are in two different locations. I'd like to allow the application server to access mysql through an SSH tunnel. Being a newb

Re: mysql connection through ssl tunnel

2008-10-21 Thread John Almberg
Now I just need to figure out how to start it on reboot, but that is something I've been meaning to learn, anyway, so I don't mind. I hope you guys will bear with me just a little more... I have spent the day trying to figure out how to create an rc script for autossh. Very cool, and not as

Re: mysql connection through ssl tunnel

2008-10-21 Thread John Almberg
On Oct 21, 2008, at 3:44 AM, Matthew Seaman wrote: John Almberg wrote: I do know that Mysql supports SSL... somehow this got discounted early in the discussion, perhaps mistakenly? I believe the thinking was that although MySQL claims to support SSL, it does in fact make a pretty bodge of i

Re: mysql connection through ssl tunnel

2008-10-21 Thread John Almberg
On Oct 20, 2008, at 11:09 PM, Peter Boosten wrote: John Almberg wrote: I tried this, and not surprisingly, it didn't work. Now I'm trying to debug it... Maybe some mixup in the keys? In my example ssh tries to read the private key of root on the connecting server, so the server where the d

Re: mysql connection through ssl tunnel

2008-10-21 Thread Matthew Seaman
John Almberg wrote: I do know that Mysql supports SSL... somehow this got discounted early in the discussion, perhaps mistakenly? I believe the thinking was that although MySQL claims to support SSL, it does in fact make a pretty bodge of it, and a more effective approach is to pipe MySQL tra

Re: Fwd: mysql connection through ssl tunnel

2008-10-20 Thread Peter Boosten
John Almberg wrote: > > Where 'admin' is the user I am logging into on the remote machine, and > 'example.com' is the hostname of the remote machine. I guess equivalent > to the following? > > ttyv7 "/usr/bin/ssh -nNTx -R 3306:127.0.0.1:33006 [EMAIL PROTECTED] >>/dev/null 2>&1"unknown on

Re: mysql connection through ssl tunnel

2008-10-20 Thread Peter Boosten
Peter Boosten wrote: > John Almberg wrote: >> I tried this, and not surprisingly, it didn't work. Now I'm trying to >> debug it... >> > > Maybe some mixup in the keys? In my example ssh tries to read the > private key of root on the connecting server, so the server where the > database is locate

Re: mysql connection through ssl tunnel

2008-10-20 Thread Peter Boosten
John Almberg wrote: > > I tried this, and not surprisingly, it didn't work. Now I'm trying to > debug it... > Maybe some mixup in the keys? In my example ssh tries to read the private key of root on the connecting server, so the server where the database is located, because init is run as root.

Re: mysql connection through ssl tunnel

2008-10-20 Thread John Almberg
On Oct 20, 2008, at 5:21 PM, Jeremy Chadwick wrote: On Mon, Oct 20, 2008 at 03:25:23PM -0400, John Almberg wrote: On Sep 23, 2008, at 10:09 AM, Vincent Hoffman wrote: John Almberg wrote: I have two FreeBSD machines. One is a application server, the other a database server running mysql. Th

Re: mysql connection through ssl tunnel

2008-10-20 Thread Jeremy Chadwick
On Mon, Oct 20, 2008 at 03:25:23PM -0400, John Almberg wrote: > On Sep 23, 2008, at 10:09 AM, Vincent Hoffman wrote: >> John Almberg wrote: >>> I have two FreeBSD machines. One is a application server, the other a >>> database server running mysql. These machines are in two different >>> locations.

Re: mysql connection through ssl tunnel

2008-10-20 Thread John Almberg
On Oct 20, 2008, at 4:50 PM, John Almberg wrote: After a few hours of work today, I have all this working perfectly. I'm using autossh to automatically create and monitor the ssh tunnel, and I can make mysql connections through the tunnel with no problems. Very cool. And that's through

Fwd: mysql connection through ssl tunnel

2008-10-20 Thread John Almberg
After a few hours of work today, I have all this working perfectly. I'm using autossh to automatically create and monitor the ssh tunnel, and I can make mysql connections through the tunnel with no problems. Very cool. And that's through PF firewalls on both machines, which added flavor

Re: mysql connection through ssl tunnel

2008-10-20 Thread Peter Boosten
John Almberg wrote: > > On Sep 23, 2008, at 10:09 AM, Vincent Hoffman wrote: > >> John Almberg wrote: >>> I have two FreeBSD machines. One is a application server, the other a >>> database server running mysql. These machines are in two different >>> locations. I'd like to allow the application s

Re: mysql connection through ssl tunnel

2008-10-20 Thread John Almberg
On Sep 23, 2008, at 10:09 AM, Vincent Hoffman wrote: John Almberg wrote: I have two FreeBSD machines. One is a application server, the other a database server running mysql. These machines are in two different locations. I'd like to allow the application server to access mysql through an SSH t

Re: mysql connection through ssl tunnel

2008-09-24 Thread John Almberg
On Sep 23, 2008, at 1:16 PM, Mel wrote: On Tuesday 23 September 2008 15:54:10 John Almberg wrote: I have two FreeBSD machines. One is a application server, the other a database server running mysql. These machines are in two different locations. I'd like to allow the application server to acc

Re: mysql connection through ssl tunnel

2008-09-23 Thread Mel
On Tuesday 23 September 2008 15:54:10 John Almberg wrote: > I have two FreeBSD machines. One is a application server, the other a > database server running mysql. These machines are in two different > locations. I'd like to allow the application server to access mysql > through an SSH tunnel. > A

Re: mysql connection through ssl tunnel

2008-09-23 Thread Vincent Hoffman
John Almberg wrote: > I have two FreeBSD machines. One is a application server, the other a > database server running mysql. These machines are in two different > locations. I'd like to allow the application server to access mysql > through an SSH tunnel. > > Being a newbie admin, I've never set up

mysql connection through ssl tunnel

2008-09-23 Thread John Almberg
I have two FreeBSD machines. One is a application server, the other a database server running mysql. These machines are in two different locations. I'd like to allow the application server to access mysql through an SSH tunnel. Being a newbie admin, I've never set up an SSH tunnel. I've bee