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

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.

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 } This

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

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

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

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

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

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

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 server to

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

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. I'd like

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.

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

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 located, because

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

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 an

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