[GH-ISSUE #546] Default Egress Port #133

Open
opened 2026-05-07 00:19:18 +02:00 by BreizhHardware · 1 comment

Originally created by @tobzsc on GitHub (Apr 7, 2025).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/546

Hey together,

is there a way to define a standard egress port? On our infrastructure we are using other ports than the default port 22. I just checked the documentation and have not found such an option.

Originally created by @tobzsc on GitHub (Apr 7, 2025). Original GitHub issue: https://github.com/ovh/the-bastion/issues/546 Hey together, is there a way to define a standard egress port? On our infrastructure we are using other ports than the default port 22. I just checked the documentation and have not found such an option.
Author
Owner

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

Hello,

You are correct that there is no such option to do this currently, but this is an interesting suggestion.
We also have a few sub-infrastructures that are not using port 22, but what we've been usually doing in these cases is adjusting the bastion alias for the users. For example instead of having:

alias bastion="ssh -t user@bastion.example.org --"

We have:

alias bastion="ssh -t user@bastion.example.org -- -p 220"

This way, if no port is specified when using the alias, it'll use port 220. If a port is specified, it'll override what's in the alias (because it'll appear earlier in the command-line).

Still, it would be interesting to have such option, I'm leaving this open to not forget it.

<!-- gh-comment-id:3047807284 --> @speed47 commented on GitHub (Jul 8, 2025): Hello, You are correct that there is no such option to do this currently, but this is an interesting suggestion. We also have a few sub-infrastructures that are not using port 22, but what we've been usually doing in these cases is adjusting the bastion alias for the users. For example instead of having: ``` alias bastion="ssh -t user@bastion.example.org --" ``` We have: ``` alias bastion="ssh -t user@bastion.example.org -- -p 220" ``` This way, if no port is specified when using the alias, it'll use port 220. If a port is specified, it'll override what's in the alias (because it'll appear earlier in the command-line). Still, it would be interesting to have such option, I'm leaving this open to not forget it.
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#133
No description provided.