[GH-ISSUE #553] SFTP wrapper won't accept port argument #140

Closed
opened 2026-05-07 00:19:21 +02:00 by BreizhHardware · 1 comment

Originally created by @salfers on GitHub (Jun 3, 2025).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/553

The -P argument to the sftp wrapper does not work:

% ~/sftp-via-bastion.internal -P 1234 root@example.server
usage: /home/stefan/sftp-via-bastion.internal [-i identity_file] [-P port] [-o ssh_option] [-b batchfile] [-F ssh_config] [-l limit] [-afprv] destination

instead it has to be added directly after the destination:

% ~/sftp-via-bastion.internal root@example.server:1234
*------------------------------------------------------------------------------*
|THIS IS A PRIVATE COMPUTER SYSTEM, UNAUTHORIZED ACCESS IS STRICTLY PROHIBITED.|
|ALL CONNECTIONS ARE LOGGED. IF YOU ARE NOT AUTHORIZED, DISCONNECT NOW.        |
*------------------------------------------------------------------------------*
 will try the following accesses you have:
[...]
Originally created by @salfers on GitHub (Jun 3, 2025). Original GitHub issue: https://github.com/ovh/the-bastion/issues/553 The `-P` argument to the sftp wrapper does not work: ``` % ~/sftp-via-bastion.internal -P 1234 root@example.server usage: /home/stefan/sftp-via-bastion.internal [-i identity_file] [-P port] [-o ssh_option] [-b batchfile] [-F ssh_config] [-l limit] [-afprv] destination ``` instead it has to be added directly after the destination: ``` % ~/sftp-via-bastion.internal root@example.server:1234 *------------------------------------------------------------------------------* |THIS IS A PRIVATE COMPUTER SYSTEM, UNAUTHORIZED ACCESS IS STRICTLY PROHIBITED.| |ALL CONNECTIONS ARE LOGGED. IF YOU ARE NOT AUTHORIZED, DISCONNECT NOW. | *------------------------------------------------------------------------------* will try the following accesses you have: [...] ```
Author
Owner

@speed47 commented on GitHub (Jul 7, 2025):

Thanks for the report, the -P option was indeed not handled correctly

<!-- gh-comment-id:3044242397 --> @speed47 commented on GitHub (Jul 7, 2025): Thanks for the report, the `-P` option was indeed not handled correctly
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#140
No description provided.