Bug 2785 - Add -P ssh option as alias for -p to set the port
Summary: Add -P ssh option as alias for -p to set the port
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 7.6p1
Hardware: Other All
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-27 23:20 AEST by Dan MacDonald
Modified: 2021-04-23 14:58 AEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan MacDonald 2017-09-27 23:20:52 AEST
Arguably the second most popular SSH util after ssh itself is scp. Confusingly (especially for newcomers) ssh uses -p to set the port to use whilst scp uses -P.

I've been using Linux for 21 years now but I still make the mistake of getting the case of these options wrong. As far as I can see, -P isn't currently being used as an option by ssh so I would like to see it added as an alias / alternative to using -p so as to match with scp.

PS I've made a lot of feature requests in my time but this one took me the longest to actually get around to. I'm sure its been secretly annoying thousands of other sysadmins for decades too! :)

Thanks ssh team!
Comment 1 Darren Tucker 2017-09-28 07:10:36 AEST
It is actually used in ssh although it's for a deprecated option:

$ grep -C1 "'P'" ssh.c
			break;
		case 'P':	/* deprecated */
			options.use_privileged_port = 0;


-oport=N works on both, though.
Comment 2 Damien Miller 2021-04-23 14:58:10 AEST
closing resolved bugs as of 8.6p1 release