OS X Terminal Remote Connection Port Number

19,817

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 172.16.215.150 as root:

Screenshot

Share:
19,817

Related videos on Youtube

slhck
Author by

slhck

Updated on September 18, 2022

Comments

  • slhck
    slhck over 1 year

    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:

    http://osxdaily.com/2012/06/03/create-ssh-bookmarks-in-terminal-for-mac-os-x/

    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?