In an old (2001?) script for the Linux OS I've encountered the use of the -P option for the ssh command:

$ ssh -P host.domain -l user

But in the ssh manual page there's no mention of a -P option. Nevertheless, executing ssh -P host.domain doesn't show any warning or error.

What's it? Could be an old/undocumented option?


Old version man page:


Use non privileged port. With this you cannot use rhosts or rsarhosts authentications, but it can be used to bypass some firewalls that dont allow privileged source ports to pass.



Specifies whether to use privileged port when connecting to other end. The default is yes if rhosts or rsarhosts authentications are enabled.

Straight from the source code:

            case 'P':       /* deprecated */
                    options.use_privileged_port = 0;

It sets the option to 0, which seems to be the default value anyway, so it does nothing. Ignoring deprecated options helps backwards compatibility in cases where it does not affect functionality...

The /* deprecated */ change dates back to 2002-09-04.

Even the bit of code I quoted above (from openssh-portable 7.7) just about got removed in a recent commit:

upstream: Deprecate UsePrivilegedPort

now that support for running ssh(1) setuid has been removed, remove supporting code and clean up references to it in the man pages

We have not shipped ssh(1) the setuid bit since 2002. If ayone really needs to make connections from a low port number this can be implemented via a small setuid ProxyCommand.

ok markus@ jmc@ djm@

OpenBSD-Commit-ID: d03364610b7123ae4c6792f5274bd147b6de717e

It still ignores the option but no longer even sets an internal variable to go with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.