This is a trick that gets me every time. To specify a port for
ssh you need the argument
-p but for
scp it is
scp -p preserves the modification times of the files you are transferring. I’d love to know why they are different. I can only assume it’s because the need to preserve modification times came before the need to specify a port and they wouldn’t change backward compatibility.
ssh -p scp -P