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've been trying to set up a remote connection via terminal, but I'm running into a few issues.

This is how I initially had it set up:

ssh root@***.***.***.**

Then I tried to add the -p 1234, but it the port number kept getting removed when closing the remove connection window. So then I referred to this tutorial:

But that still didn't work. Any ideas how I can add the port number just once without having to re-enter it upon connection?

share|improve this question
up vote 3 down vote accepted

Cannot reproduce the problem. Imagine the format of the SSH command line string as follows:

ssh [user@]server

Now, to make sure that your custom port is always part of that, we don't add a username, and use -p 1234 root@hostname_or_ip as the hostname, resulting in

ssh -p 1234 root@hostname_or_ip

This will be the ssh command line used whenever you select this entry from the servers list.

The following works like a charm connecting to a system with SSH port 220 and IP address as root:


share|improve this answer
Worked like a charm, thank you very much :) – Iestyn Jun 28 '12 at 12:22

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.