The most annoying thing about SSH/scp!
The most annoying thing about SSH/scp!
So when you write your scp command and then realize you forgot to put in the port you have to go back and put it before the target.
Then again, I'm speaking as someone that came into the scene well after development, so that could just be annoyance via naivete.
The config-aware shell completion is especially cool.
I hadn't even noticed, because I tend to automatically reach for rsync instead, even for single files.
Edit: and until the ticket you just linked, I assumed scp and cp were intended to be close equivalents, given the whole ending in ‘cp’ thing.
NOPE I'd just specified the option wrong!
-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.Usually I use per host `ssh_config(5)` (both for port and user) but some tools also don't make use of that!