Comments (6)
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.
Don't use root
as the username
from docker-openssh-server.
Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!
from docker-openssh-server.
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.
No, that does not solve the problem.
from docker-openssh-server.
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)
- SUDO ALL for password based auth HOT 2
- Set the user's home directory HOT 8
- possible add root ssh login support HOT 1
- 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
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.