GithubHelp home page GithubHelp logo

Comments (6)

mihaigalos avatar mihaigalos commented on August 16, 2024 2

Thank you, that worked. Created a new user dev, generated ssh keys and used this docker-compose.yaml:

---
version: "2.1"
services:
  openssh-server:
    image: ghcr.io/linuxserver/openssh-server
    hostname: openssh-server #optional
    environment:
      - HISTFILE=/root/.history_make_shell
      - PASSWORD_ACCESS=false #optional
      - PGID=1000
      - PUBLIC_KEY_FILE=/root/.ssh/id_ed25519.pub #optional
      - PUID=1000
      - SUDO_ACCESS=false #optional
      - TZ=Europe/London
      - USER_NAME=dev #optional
    volumes:
      - /path/to/appdata/config:/config
      - $PWD/keys/id_ed25519.pub:/root/.ssh/id_ed25519.pub
      - ~/.history_make_shell:/root/.history_make_shell
    ports:
      - 2222:2222
    restart: unless-stopped

And:

ssh -i keys/id_ed25519 -p 2222 [email protected]                                                                                               mihai@galos 19/07/21 20:18:10
Welcome to OpenSSH Server

openssh-server:~$

from docker-openssh-server.

aptalca avatar aptalca commented on August 16, 2024 1

Don't use root as the username

from docker-openssh-server.

github-actions avatar github-actions commented on August 16, 2024

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

from docker-openssh-server.

tobbenb avatar tobbenb commented on August 16, 2024

You should not have the PUBLIC_KEY_DIR and PUBLIC_KEY_FILE when not using them. Remove them and see if that fixes your issue.

from docker-openssh-server.

mihaigalos avatar mihaigalos commented on August 16, 2024

No, that does not solve the problem.

from docker-openssh-server.

mihaigalos avatar mihaigalos commented on August 16, 2024

If I attach to the running docker, the /config/.ssh/authorized_keys contains the correct key however:

root@openssh-server:/config/.ssh# cat authorized_keys 
AAAAB3NzaC1yc2EAAAADAQABAAABgQC/xsm9kvCI00mYVGIpppF37IQlV361wMfEgDdgno+q8Pz11RpmaDcZ3stvQ6CFYpypbkBOiuEo2sW0kYPmaNR91V3C20woR0vwi9DwlkZuYCt/w6kW4wJG8XjCKYu7tQ/Lrzoa28wH+mBflZAmVJu/0ua7MhMFw1AqvQlgd+uwO0LOwWDGTrE5Odds3pBc8XYji9Xjww8tzTT13EwpSLxxrU/Ee5wPWk5bv2IRs6hYS9mympd8+ysiZnxRSs0j3hXRhrru0IocSa8pEtGfCCT0cGl5z77SIEs1wOgRhu9JigkIr/RLjcudpcXm4TmuCVkBCsxz2XZ5lQx2tAKdkboSaBriaw6Bl1V0Kl9YDSoAjx5wxMy4ORhjXJ6pdvSMHnvcWKP9wO+mE+Mscl/VnmOlErKwCIIhOBs/IbqgvcQdlZ3PbtzeJQQDnr+DRs4GN6AbWk1UZecKgLLnT8Yl+hrYtD9RAcrBvHKKpp7HO/B7b9YfOmiSm6fb3VfYGq5MfM8=

from docker-openssh-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.