Skip to content

Instantly share code, notes, and snippets.

@dsamarin
Created November 7, 2018 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsamarin/4bddfe601783113e042893e9d5458566 to your computer and use it in GitHub Desktop.
Save dsamarin/4bddfe601783113e042893e9d5458566 to your computer and use it in GitHub Desktop.
#!/bin/bash
SSH_HOST=dsamar.in
SSH_SOCKET=~/.ssh/ihs.dsamar.in.sock
SSH_TUNNEL=3306:localhost:3306
ssh -fMnNT -S "$SSH_SOCKET" -L "$SSH_TUNNEL" "$SSH_HOST"
gnucash mysql://ihs@127.0.0.1/ihs
ssh -S "$SSH_SOCKET" -O exit "$SSH_HOST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment