Hacker News new | past | comments | ask | show | jobs | submit login

I always just use -o port=<xx> for this reason.



I use rsync with -e 'ssh -p PORT', so that I can also have the ability to resume just in case :D, interesting how everyone has a different solution ^^, let's see how many ways of doing the same thing can we collect in this thread


Another one is places where you can use `user@host` and those where you can't and have to use `-l user` (and thus have to use `-e 'ssh -l user'` or equivalent)

Usually I use per host `ssh_config(5)` (both for port and user) but some tools also don't make use of that!


Wait, lower case 'o' works?


Looks like I've got BSD SSH installed. From `man ssh`:

     -o option
             Can be used to give options in the format used in the configura‐
             tion file.  This is useful for specifying options for which there
             is no separate command-line flag.  For full details of the op‐
             tions listed below, and their possible values, see ssh_config(5).
`Port` is on the list underneath. So I think the idea is you run

    ssh -o <option_name> <option_value>
where the first can be `--port`. This looks like it will be really handy for me for the exact reason GP said.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: