Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when specifying user public key #350

Closed
pragdev opened this issue Nov 29, 2022 · 1 comment
Closed

Error when specifying user public key #350

pragdev opened this issue Nov 29, 2022 · 1 comment

Comments

@pragdev
Copy link

pragdev commented Nov 29, 2022

Hello, I'm not able to get the logging with ssh key working. This is the docker config

version: "2.1"

services:
  # https://hub.docker.com/r/atmoz/sftp/
  # connecting with: sftp -P 3333 user@localhost
  sftp:
    image: atmoz/sftp
    container_name: recon_sftp
    volumes:
      - ./src/main/resources/rsa_key.pub:/home/user-1/.ssh/keys/rsa_key.pub:ro
 
    ports:
      - "3333:22"
    command: "user-1::::test"

and this is the output:

recon_sftp  | [/usr/local/bin/create-sftp-user] Parsing user data: "user-1::::x"
recon_sftp  | cat: /home/user-1/.ssh/keys/rsa_key.pub: Is a directory
recon_sftp  | /usr/local/bin/create-sftp-user: Error on line 90: cat "$publickey" >> "$userKeysAllowedFileTmp"
recon_sftp  | /entrypoint: Error on line 60: create-sftp-user "$user"
recon_sftp exited with code 1
@pragdev
Copy link
Author

pragdev commented Nov 29, 2022

Turned out, docker compose is creating a directory if you are using a path leading to a non existent file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant