Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have an alias to connect to a remote server:

alias server='ssh'

I would like to have an alias to connect to this server, and then automatically open mysql terminal.

Currently, I connect to the server and then run:



Is there anything like:

alias serverdb='ssh && mysql'

but to be executed on the remote server?

share|improve this question
up vote 2 down vote accepted

Leave off the &&. It probably will work better if you force a tty as well (the -tt below).

alias serverdb='ssh -tt mysql'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.