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

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

1 Answer 1

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.