ssh tunnel / port forwards with OS_Process

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ssh tunnel / port forwards with OS_Process

Todd Vainisi-2
Hey list,

I need to establish an ssh tunnel for about 10 minutes each night so I can run some stuff based on instructions in a remote mysql db.  Lasso 8.6.

It’s basically just the command "ssh -L 13306:localhost:3306 myuser@mydomain” (I guess I’ll have to pass thru a password as well).

Is this something I can do from OS_Process - can I exit the tunnel from os_process using lasso as well?

Todd




#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: ssh tunnel / port forwards with OS_Process

Dave Bruhn
I'm not sure how well this will integrate with os_process, but I'd use a socket when opening the ssh session, then close it.  Very scriptable.

Open the ssh session:
ssh -M -S my-ctrl-socket -fnNT -L 3306:localhost:3306 myuser@mydomain

Closing it:
ssh -S my-ctrl-socket -O exit myuser@mydomain
---
Dave Bruhn
Senior Systems Analyst
North Carolina Hospital Association
PO Box 4449
Cary, NC 27519-4449
919-677-4145 (office)
[hidden email]
http://www.ncha.org

> On May 20, 2016, at 1:40 PM, Todd Vainisi <[hidden email]> wrote:
>
> Hey list,
>
> I need to establish an ssh tunnel for about 10 minutes each night so I can run some stuff based on instructions in a remote mysql db.  Lasso 8.6.
>
> It’s basically just the command "ssh -L 13306:localhost:3306 myuser@mydomain” (I guess I’ll have to pass thru a password as well).
>
> Is this something I can do from OS_Process - can I exit the tunnel from os_process using lasso as well?
>
> Todd
>
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>