Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sshd_config: ability to define more than one Port #33

Closed
millerjl1701 opened this issue Apr 15, 2013 · 8 comments
Closed

sshd_config: ability to define more than one Port #33

millerjl1701 opened this issue Apr 15, 2013 · 8 comments
Labels
invalid This doesn't seem right

Comments

@millerjl1701
Copy link

It was most excellent that we can specify more than one IPv4/IPv6 address to listen on with sshd. It would be also most helpful to be able to specify an array of ports to listen to that result in an individual configuration line in sshd_config as well. i.e.

sshd_config { 'Port':
value => [ '22', '8022' ],
}

would result in placing the following lines in the sshd_config:
Port 22
Port 24

If there is anything else that you would like to know concerning this, or are looking for a tester should you accept this, please let me know. Thank you!
Jeffrey

@domcleal
Copy link
Contributor

This doesn't appear to be valid syntax on OpenSSH 6.1 at least:

Apr 20 21:04:09 iridium sshd[9745]: /etc/ssh/sshd_config line 13: garbage at end of line; "8022".

Can you confirm?

@domcleal
Copy link
Contributor

Oh, ignore that, I misunderstood.

This works as you describe, having just run a test - two Port lines get created in the target file.

@millerjl1701
Copy link
Author

Correct, two separate Port lines getting created in the target file is the intent of the request to allow the sshd daemon to listen simultaneously to two separate ports instead of just one. Thanks!

@domcleal
Copy link
Contributor

Excellent :)

@millerjl1701
Copy link
Author

Did I miss something? I see you closed the issue, but I do not see a patch against this...

@domcleal
Copy link
Contributor

It already works this way, I don't think there's any change required?

@millerjl1701
Copy link
Author

Sorry on the delay. You are quite correct... the code is functioning this way. When I first was testing, somehow I got concatenated ports on a single line... But, i cannot replicate that behaviour. When I give it an array of ports or a single port, multiple or single lines are created in the target, respectively. Thanks again!

@domcleal
Copy link
Contributor

Ah ok, no worries. If you come across it again, do let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants