openssh-server

10.3_p1-r1-ls239

openssh-server 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.

docker pull lscr.io/linuxserver/openssh-server:latest

Quick start

Generated from the image's own configuration. Replace the /path/to folders with real paths on your host.

---
services:
  openssh-server:
    image: lscr.io/linuxserver/openssh-server:latest
    container_name: openssh-server
    hostname: openssh-server # optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - PUBLIC_KEY=yourpublickey # optional
      - PUBLIC_KEY_FILE=/path/to/file # optional
      - PUBLIC_KEY_DIR=/path/to/directory/containing/_only_/pubkeys # optional
      - PUBLIC_KEY_URL=https://github.com/username.keys # optional
      - SUDO_ACCESS=false # optional
      - PASSWORD_ACCESS=false # optional
      - USER_PASSWORD=password # optional
      - USER_PASSWORD_FILE=/path/to/file # optional
      - USER_NAME=linuxserver.io # optional
      - LOG_STDOUT= # optional
    volumes:
      - /path/to/openssh-server/config:/config
    ports:
      - 2222:2222
    restart: unless-stopped

Parameters

Ports
PortFunctionRequired
2222:2222ssh portrequired
Environment variables
VariableFunctionRequired
PUID=1000User IDrequired
PGID=1000Group IDrequired
TZ=Etc/UTCTimezonerequired
PUBLIC_KEY=yourpublickeyOptional ssh public key, which will automatically be added to authorized_keys.optional
PUBLIC_KEY_FILE=/path/to/fileOptionally specify a file containing the public key (works with docker secrets).optional
PUBLIC_KEY_DIR=/path/to/directory/containing/_only_/pubkeysOptionally specify a directory containing the public keys (works with docker secrets).optional
PUBLIC_KEY_URL=https://github.com/username.keysOptionally specify a URL containing the public key.optional
SUDO_ACCESS=falseSet to `true` to allow `linuxserver.io`, the ssh user, sudo access. Without `USER_PASSWORD` set, this will allow passwordless sudo access.optional
PASSWORD_ACCESS=falseSet to `true` to allow user/password ssh access. You will want to set `USER_PASSWORD` or `USER_PASSWORD_FILE` as well.optional
USER_PASSWORD=passwordOptionally 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
USER_PASSWORD_FILE=/path/to/fileOptionally specify a file that contains the password. This setting supersedes the `USER_PASSWORD` option (works with docker secrets).optional
USER_NAME=linuxserver.ioOptionally specify a user name (Default:`linuxserver.io`)optional
LOG_STDOUT=Set to `true` to log to stdout instead of file.optional
Volumes
PathFunctionRequired
/configContains all relevant configuration files.required
Other settings
SettingFunctionRequired
hostname: openssh-serverOptionally the hostname can be defined.optional

Architectures

Pulling :latest picks the right one for your host automatically.

  • x86_64amd64-latest
  • arm64arm64v8-latest

Tags

  • :latestStable releases

Changelog

  1. Rebase to Alpine 3.24.

  2. Rebase to Alpine 3.23.

  3. Rebase to Alpine 3.22.

Related

Browse all

netbox

v4.7.3-ls387

netbox is an IP address management (IPAM) and data center infrastructure management (DCIM) tool. Initially conceived by the network engineering team at DigitalOcean, NetBox was developed specifically to address the needs of network and infrastructure engineers. It is intended to function as a domain-specific source of truth for network operations.

91.8K pulls per month129 GitHub starsarm64

doublecommander

94a19f35-ls329

Double Commander is a free cross platform open source file manager with two panels side by side. It is inspired by Total Commander and features some new ideas.

68.5K pulls per month51 GitHub starsarm64

hishtory-server

v0.335-ls164

hiSHtory is a better shell history. It stores your shell history in context (what directory you ran the command in, whether it succeeded or failed, how long it took, etc). This is all stored locally and end-to-end encrypted for syncing to to all your other computers.

31.7K pulls per month30 GitHub starsarm64

ldap-auth

3.4.8-ls12

ldap-auth software is for authenticating users who request protected resources from servers proxied by nginx. It includes a daemon (ldap-auth) that communicates with an authentication server, and a webserver daemon that generates an authentication cookie based on the user’s credentials. The daemons are written in Python for use with a Lightweight Directory Access Protocol (LDAP) authentication server (OpenLDAP or Microsoft Windows Active Directory 2003 and 2012).

1.3K pulls per month75 GitHub starsarm64