[cfarm-users] how to omit the port from ssh commands

Bruno Haible bruno at clisp.org
Sat Mar 27 17:25:24 CET 2021


Some machines of the compile farm require a non-default port [1].

But it's annoying to remember in every command that while ssh takes a
'-p' option, scp wants a '-P' option.

Here's a trick: You can omit the -p / -P options if you add this to
your $HOME/.ssh/config file:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Host gcc120.fsffrance.org
    Port 45000

Host gcc121.fsffrance.org
    Port 45001

Host gcc122.fsffrance.org
    Port 45002

Host gcc123.fsffrance.org
    Port 45003

Host gcc140.fsffrance.org
    Port 45019

Host gcc300.fsffrance.org
    Port 2400

Host gcc301.fsffrance.org
    Port 2401

Host gcc302.fsffrance.org
    Port 2402

Host gcc303.fsffrance.org
    Port 2403

Host gcc304.fsffrance.org
    Port 2409
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

More info about this config file at [2].

Hope it helps (and I wasn't the only ignorant guy:)).

           Bruno

[1] https://cfarm.tetaneutral.net/machines/list/
[2] https://linuxize.com/post/using-the-ssh-config-file/



More information about the cfarm-users mailing list