Skip to main content
Question

Self Service for SSH DB Connection


Forum|alt.badge.img+3

We have a DB that needs an ssh tunnel in order for the user to connect. What might be the best way to automate this and make it as easy for the user as possible. Obviously these are non-tech people otherwise we'd just tell them to ssh via terminal.

Let's say we wanted to push a private key to each user, make a self service button that said Connect to DB. Possible? Better alternatives? This is essentially what I do now via ab alias. I have the added complexity of storing my private key in an encrypted dmg file, we'll have filevault on all machines and could push this into /Users/username/.ssh/keys/ for example

$ ukdb

$ alias ukdb='ssh -fNg -o ExitOnForwardFailure=yes -o ServerAliveInterval=15 -L 3307:db.server.com:3306 -i /Volumes/secure-dmg/keys/mysql-key username@ssh-gw.server.com;'

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings