{"status":"OK","last_updated":"2026-11-29 15:34:37+00:00","data":{"image":{"name":"openssh-server","initial_date":"2019-10-17","github_url":"https://github.com/linuxserver-playground/docker-openssh-server","project_url":"https://www.openssh.com/","project_logo":"https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/openssh-server-logo.png","description":"[Openssh-server](https://www.openssh.com/) is a sandboxed environment that allows ssh access without giving keys to the entire server. Giving ssh access via private key often means giving full access to the server. This container creates a limited and sandboxed environment that others can ssh into. The users only have access to the folders mapped and the processes running inside this container.","version":"10.3_p1-r2-ls8","version_timestamp":"2026-11-27 14:05:21+00:00","category":"Administration","stable":true,"deprecated":false,"stars":0,"tags":[{"tag":"latest","desc":"Stable releases"}],"architectures":[{"arch":"x86_64","tag":"amd64-latest"},{"arch":"arm64","tag":"arm64v8-latest"}],"changelog":[{"date":"2026-07-05","desc":"Rebase to Alpine 3.24."},{"date":"2025-12-28","desc":"Rebase to Alpine 3.23."},{"date":"2025-07-05","desc":"Rebase to Alpine 3.22."},{"date":"2025-02-10","desc":"Add support for sshd_config.d"},{"date":"2025-01-12","desc":"Rebase to Alpine 3.21."},{"date":"2024-11-24","desc":"Move sshd_config to /config/sshd/sshd_config."},{"date":"2024-05-31","desc":"Rebase to Alpine 3.20."},{"date":"2024-05-04","desc":"Display the SSH host public keys every time the container starts."},{"date":"2024-03-09","desc":"Rebase to Alpine 3.19."},{"date":"2023-06-12","desc":"Rebase to Alpine 3.18, deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"},{"date":"2023-03-05","desc":"Rebase to Alpine 3.17."},{"date":"2022-10-18","desc":"Fix wrong behavior of password/passwordless sudo"},{"date":"2022-10-11","desc":"Rebase to Alpine 3.16, migrate to s6v3."},{"date":"2022-09-15","desc":"add netcat-openbsd with support for proxies."},{"date":"2022-07-18","desc":"Fix service perms to comply with upgrade to s6 v3."},{"date":"2022-04-16","desc":"Rebase to alpine 3.15."},{"date":"2021-11-16","desc":"Add PUBLIC_KEY_URL option"},{"date":"2021-06-28","desc":"Rebasing to alpine 3.14. Add support for PAM."},{"date":"2021-02-10","desc":"Rebasing to alpine 3.13. Add openssh-client for scp."},{"date":"2020-10-21","desc":"Implement s6-log for openssh, which adds local timestamps to logs and can be used with a log parser like fail2ban."},{"date":"2020-10-20","desc":"Set umask for sftp."},{"date":"2020-06-01","desc":"Rebasing to alpine 3.12."},{"date":"2020-01-18","desc":"Add key generation script."},{"date":"2020-01-13","desc":"Add openssh-sftp-server."},{"date":"2019-12-19","desc":"Rebasing to alpine 3.11."},{"date":"2019-10-17","desc":"Initial Release."}],"config":{"application_setup":"https://github.com/linuxserver-playground/docker-openssh-server?tab=readme-ov-file#application-setup","readonly_supported":false,"nonroot_supported":false,"hostname":{"hostname":"openssh-server","desc":"Optionally the hostname can be defined.","optional":true},"env_vars":[{"name":"PUID","value":"1000","desc":"User ID","optional":false},{"name":"PGID","value":"1000","desc":"Group ID","optional":false},{"name":"TZ","value":"Etc/UTC","desc":"Timezone","optional":false},{"name":"PUBLIC_KEY","value":"yourpublickey","desc":"Optional ssh public key, which will automatically be added to authorized_keys.","optional":true},{"name":"PUBLIC_KEY_FILE","value":"/path/to/file","desc":"Optionally specify a file containing the public key (works with docker secrets).","optional":true},{"name":"PUBLIC_KEY_DIR","value":"/path/to/directory/containing/_only_/pubkeys","desc":"Optionally specify a directory containing the public keys (works with docker secrets).","optional":true},{"name":"PUBLIC_KEY_URL","value":"https://github.com/username.keys","desc":"Optionally specify a URL containing the public key.","optional":true},{"name":"SUDO_ACCESS","value":"false","desc":"Set to `true` to allow `linuxserver.io`, the ssh user, sudo access. Without `USER_PASSWORD` set, this will allow passwordless sudo access.","optional":true},{"name":"PASSWORD_ACCESS","value":"false","desc":"Set to `true` to allow user/password ssh access. You will want to set `USER_PASSWORD` or `USER_PASSWORD_FILE` as well.","optional":true},{"name":"USER_PASSWORD","value":"password","desc":"Optionally set a sudo password for `linuxserver.io`, the ssh user. If this or `USER_PASSWORD_FILE` are not set but `SUDO_ACCESS` is set to true, the user will have passwordless sudo access.","optional":true},{"name":"USER_PASSWORD_FILE","value":"/path/to/file","desc":"Optionally specify a file that contains the password. This setting supersedes the `USER_PASSWORD` option (works with docker secrets).","optional":true},{"name":"USER_NAME","value":"linuxserver.io","desc":"Optionally specify a user name (Default:`linuxserver.io`)","optional":true},{"name":"LOG_STDOUT","value":"","desc":"Set to `true` to log to stdout instead of file.","optional":true}],"volumes":[{"path":"/config","host_path":"/path/to/openssh-server/config","desc":"Contains all relevant configuration files.","optional":false}],"ports":[{"external":"2222","internal":"2222","desc":"ssh port","optional":false}]},"title":"Openssh-server","sponsor":[{"name":"OpenSSH donations","url":"https://www.openssh.org/donations.html"},{"name":"OpenBSD Foundation donations","url":"https://www.openbsdfoundation.org/donations.html"}],"maintainers":[],"kind":"app","categories":["Administration"],"setup_instructions":"If `PUBLIC_KEY` or `PUBLIC_KEY_FILE`, or `PUBLIC_KEY_DIR` variables are set, the specified keys will automatically be added to `authorized_keys`. If not, the keys can manually be added to `/config/.ssh/authorized_keys` and the container should be restarted.\nRemoving `PUBLIC_KEY` or `PUBLIC_KEY_FILE` variables from docker run environment variables will not remove the keys from `authorized_keys`. `PUBLIC_KEY_FILE` and `PUBLIC_KEY_DIR` can be used with docker secrets.\n\nWe provide the ability to set and allow password based access via the `PASSWORD_ACCESS` and `USER_PASSWORD` variables, though we as an organization discourage using password auth for public facing ssh endpoints.\n\nConnect to server via `ssh -i /path/to/private/key -p PORT USER_NAME@SERVERIP`\n\nSetting `SUDO_ACCESS` to `true` by itself will allow passwordless sudo. `USER_PASSWORD` and `USER_PASSWORD_FILE` allow setting an optional sudo password.\n\nThe users only have access to the folders mapped and the processes running inside this container.\nAdd any volume mappings you like for the users to have access to.\nTo install packages or services for users to access, use the LinuxServer container customization methods described [in this blog article](https://blog.linuxserver.io/2019/09/14/customizing-our-containers/).\n\nSample use case is when a server admin would like to have automated incoming backups from a remote server to the local server, but they might not want all the other admins of the remote server to have full access to the local server.\nThis container can be set up with a mounted folder for incoming backups, and rsync installed via LinuxServer container customization described above, so that the incoming backups can proceed, but remote server and its admins' access would be limited to the backup folder.\n\nIt is also possible to run multiple copies of this container with different ports mapped, different folders mounted and access to different private keys for compartmentalized access.\n\n#### TIPS\nYou can volume map your own text file to `/etc/motd` to override the message displayed upon connection.\nYou can optionally set the docker argument `hostname`\n\n## Key Generation\n\nThis container has a helper script to generate an ssh private/public key. In order to generate a key please run:\n```\ndocker run --rm -it --entrypoint /keygen.sh linuxserver/openssh-server\n```\n\nThen simply follow the prompts.\nThe keys generated by this script are only displayed on your console output, so make sure to save them somewhere after generation.","archived":false,"release_url":"https://github.com/linuxserver-playground/docker-openssh-server/releases/tag/10.3_p1-r2-ls8","upstream_version":"10.3_p1-r2","base":"alpine","releases":[{"branch":"master","release_tag":"latest","channel":"stable","tag":"10.3_p1-r2-ls8","upstream_version":"10.3_p1-r2","created":"2026-11-27T14:05:21Z","release_url":"https://github.com/linuxserver-playground/docker-openssh-server/releases/tag/10.3_p1-r2-ls8","test_success":true,"base":"ghcr.io/linuxserver-playground/baseimage-alpine:3.24","platforms":["amd64","arm64"]}],"docs_url":"https://linuxserver-playground.github.io/site/images/openssh-server/","registries":{"ghcr":"ghcr.io/linuxserver-playground/openssh-server","packages_url":"https://github.com/orgs/linuxserver-playground/packages/container/package/openssh-server"},"snippets":{"docker_compose":"---\nservices:\n  openssh-server:\n    image: ghcr.io/linuxserver-playground/openssh-server:latest\n    container_name: openssh-server\n    hostname: openssh-server #optional\n    environment:\n      - PUID=1000\n      - PGID=1000\n      - TZ=Etc/UTC\n      - PUBLIC_KEY=yourpublickey #optional\n      - PUBLIC_KEY_FILE=/path/to/file #optional\n      - PUBLIC_KEY_DIR=/path/to/directory/containing/_only_/pubkeys #optional\n      - PUBLIC_KEY_URL=https://github.com/username.keys #optional\n      - SUDO_ACCESS=false #optional\n      - PASSWORD_ACCESS=false #optional\n      - USER_PASSWORD=password #optional\n      - USER_PASSWORD_FILE=/path/to/file #optional\n      - USER_NAME=linuxserver.io #optional\n      - LOG_STDOUT= #optional\n    volumes:\n      - /path/to/openssh-server/config:/config\n    ports:\n      - 2222:2222\n    restart: unless-stopped\n","docker_run":"docker run -d \\\n  --name=openssh-server \\\n  --hostname=openssh-server `#optional` \\\n  -e PUID=1000 \\\n  -e PGID=1000 \\\n  -e TZ=Etc/UTC \\\n  -e PUBLIC_KEY=yourpublickey `#optional` \\\n  -e PUBLIC_KEY_FILE=/path/to/file `#optional` \\\n  -e PUBLIC_KEY_DIR=/path/to/directory/containing/_only_/pubkeys `#optional` \\\n  -e PUBLIC_KEY_URL=https://github.com/username.keys `#optional` \\\n  -e SUDO_ACCESS=false `#optional` \\\n  -e PASSWORD_ACCESS=false `#optional` \\\n  -e USER_PASSWORD=password `#optional` \\\n  -e USER_PASSWORD_FILE=/path/to/file `#optional` \\\n  -e USER_NAME=linuxserver.io `#optional` \\\n  -e LOG_STDOUT= `#optional` \\\n  -p 2222:2222 \\\n  -v /path/to/openssh-server/config:/config \\\n  --restart unless-stopped \\\n  ghcr.io/linuxserver-playground/openssh-server:latest\n"},"links":{"builds":"https://linuxserver-playground.github.io/hub/api/v1/catalog/openssh-server/builds.json","docs":"https://linuxserver-playground.github.io/hub/stores/docs/images/docker-openssh-server.md","documentation":"https://linuxserver-playground.github.io/hub/api/v1/catalog/openssh-server/docs.json","kubernetes":"https://linuxserver-playground.github.io/hub/api/v1/catalog/openssh-server/kubernetes.yaml","quadlet":"https://linuxserver-playground.github.io/hub/api/v1/catalog/openssh-server/quadlet.container","mods":"https://linuxserver-playground.github.io/hub/api/v1/catalog/openssh-server/mods.json"}}}}