Bug 2749 - support -P and -p in ssh and sftp
Summary: support -P and -p in ssh and sftp
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 7.2p2
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-27 01:44 AEST by jg
Modified: 2021-04-23 14:53 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 jg 2017-07-27 01:44:22 AEST
Hello
I saw that confusingly sftp requires -P, and ssh requires -p for the port number.
Could they be standardised n -p ? and in the meantime, support both ?

Regards, Jonny
Comment 1 Damien Miller 2017-07-27 11:36:48 AEST
Sorry, -p is already used in scp and sftp for another purpose. Changing its meaning would break >10 years of working scripts.
Comment 2 jg 2017-07-27 11:39:57 AEST
Maybe need a new letter, which is a standard that works across all

Or even accept IP:port style?
Comment 3 Darren Tucker 2017-07-27 13:08:45 AEST
-oPort=N works on both.
Comment 4 jg 2017-07-27 14:06:51 AEST
Darren, would the standard help be updated to show that instead?
Comment 5 Darren Tucker 2017-07-27 14:24:10 AEST
-o is in the standard usage text for both sftp and scp.  All of the arguments it can take are not because there are dozens of them and they're all documented in the man page.
Comment 6 jg 2017-07-27 14:40:53 AEST
Thinking like below. Likewise for SSH and SCP.

usage: sftp [-1246aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
          [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
          [-o ssh_option] [-oPort=N] [-R num_requests] [-S program]
          [-s subsystem | sftp_server] host
       sftp [user@]host[:file ...]
       sftp [user@]host[:dir[/]]
       sftp -b batchfile [user@]ho
Comment 7 Darren Tucker 2017-07-27 14:54:41 AEST
I don't think so, sorry.
Comment 8 Damien Miller 2021-04-23 14:53:11 AEST
closing resolved bugs as of 8.6p1 release