Comments (16)
There's an open PR (#42) but it's waiting on the submitter to make the necessary documentation changes.
I think they got bored.
from docker-openssh-server.
Thanks for opening your first issue here! Be sure to follow the issue template!
from docker-openssh-server.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from docker-openssh-server.
hmm. i have the same issue. i set the port to 2223 but the issue is the script is hardcoded to 2222
from docker-openssh-server.
thank you! :D
from docker-openssh-server.
Until #42 is merged, this is my workaround:
Create a file custom-port.sh
in <config-path>/custom-cont-init.d/
with:
#!/bin/bash
# Replace 22 with your custom port
sed -i 's/-p 2222/-p 22/' /etc/services.d/openssh-server/run
from docker-openssh-server.
ya. i did the same last eve.
sed -i -e 's/^USER_NAME=.*/USER_NAME=root/' -e 's/2222$/22/' /etc/services.d/openssh-server/run
i had to change the USER_NAME=root
because i was getting perm denied as the regular user (911).
which i also had to change the perm and ownership of the ssh_host* files as well.
from docker-openssh-server.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from docker-openssh-server.
Doing it like this rn in a custom init script:
sed -i 's/2222/{{ env "NOMAD_PORT_[[ $task.name ]]" }}/' /etc/s6-overlay/s6-rc.d/svc-openssh-server/run
sed -i 's/2222/{{ env "NOMAD_PORT_[[ $task.name ]]" }}/' /var/run/service/svc-openssh-server/run.user
Feels dirty.
Another approach is to run socat:
socat TCP-LISTEN:{{ env "NOMAD_PORT_[[ $task.name ]]" }},fork,reuseaddr TCP:127.0.0.1:2222 &
One should consider putting that in a loop, I guess (getting dirty again):
(
while true; do
socat TCP-LISTEN:{{ env "NOMAD_PORT_[[ $task.name ]]" }},fork,reuseaddr TCP:127.0.0.1:2222
done
) &
from docker-openssh-server.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from docker-openssh-server.
bump. This is still highly desired. Not having a port config option in a server ist just silly for anything but the simplest servers.
from docker-openssh-server.
It seems you can just use LISTEN_PORT
from docker-openssh-server.
Ok I added LISTEN_PORT as a new environment variable for my docker-compose and it works! And yet, the corresponding image documentation isn't reflecting this change. I had to come here to learn this. Thanks @linuxmaniac
from docker-openssh-server.
@yoelvd please provide a PR with the changes in doc that you would like to see as a new user of the image. That would be great
from docker-openssh-server.
It's not documented because we don't support it.
95% of the use cases that require it are scenarios we don't support in the first place because they are entirely ephemeral and don't provide any means of mounting a persistent /config (and thus editing sshd_config
to change the listen port). Including it in the readme would imply support that we're not willing to provide.
Rather than not provide any option at all, we opted to provide an undocumented route that those with the wherewithal to understand can make use of, on the basis that if you can figure that out you're probably not going to be coming back to us for basic support for your weird setup.
(And yes, we were originally hard-coding the listen port in the sshd run command which was overriding the value(s) in sshd_config
but that's no longer the case).
from docker-openssh-server.
closing as we have provided an explanation and our support stance. We will not entertain documenting it.
from docker-openssh-server.
Related Issues (20)
- Providing static host keys prevents ssh server startup HOT 5
- openssh logs should not be accessible/removable by the user HOT 2
- Release 8.8_p1-r1-ls85 is broken HOT 1
- consider non-interactive key generation for testing purposes HOT 4
- Wrong behavior of password/passwordless sudo HOT 1
- Ability to forward a port with the -R (reverse) option HOT 3
- Running in Azure Container Instance is broken due to init use HOT 4
- [FEAT] Environment variables for remote user HOT 3
- [FEAT] Healthcheck for dockerfile HOT 2
- [BUG] grep error in logs HOT 10
- [BUG] Unable to start server on kubernetes using shareProcessNamespace with another container HOT 2
- [BUG] The UMASK environmental variable no longer works HOT 5
- [FEAT] Rootless mode HOT 7
- [BUG] Public key files from PUBLIC_KEY_DIR does not get imported HOT 3
- Permissions 0777 for host keys are too open - sshd terminates HOT 9
- Unable to ChrootDirectory HOT 10
- [FEAT] How to disable user shell (sftp mode only) HOT 3
- [FEAT] Add another versioning support HOT 8
- [FEAT] Update openssh-server to 9.8_p1. The current version 9.7_p1 is affected by CVE-2024-6387 HOT 3
- [FEAT] LISTEN_PORT in documentation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-openssh-server.