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

unable to connect no matter what #384

Open
felixtech-msp opened this issue Jul 24, 2023 · 3 comments
Open

unable to connect no matter what #384

felixtech-msp opened this issue Jul 24, 2023 · 3 comments

Comments

@felixtech-msp
Copy link

I am completely unable to connect to the server with neither SFTP or SCP. There is no useful log output, even in DEBUG3 log level.
Authentication is successful but then establishing a session is impossible and will always fail. The server doesn't respond anymore after authenticating.

docker-compose.yml

  teleporter:
    image: atmoz/sftp:alpine
    restart: always
    ports:
      - "2222:22/tcp"
    volumes:
      - teleporter:/home/user/backups:ro
      - teleporter-config:/etc/ssh
    command: user:pass:::backups
    network_mode: bridge

Log output after successful authentication:

Accepted password for user from 192.168.0.2 port 51034 ssh2
debug1: monitor_child_preauth: user user authenticated by privileged process
debug3: mm_get_keystate: Waiting for new keys
debug3: mm_request_receive_expect: entering, type 26
debug3: mm_request_receive: entering
debug3: mm_get_keystate: GOT new keys
debug3: mm_auth_password: user authenticated [preauth]
debug3: user_specific_delay: user specific delay 0.000ms [preauth]
debug3: ensure_minimum_time_since: elapsed 19.212ms, delaying 15.619ms (requested 8.708ms) [preauth]
debug3: send packet: type 52 [preauth]
debug3: mm_request_send: entering, type 26 [preauth]
debug3: mm_send_keystate: Finished sending state [preauth]
debug1: monitor_read_log: child log fd closed
debug3: ssh_sandbox_parent_finish: finished
User child is on pid 25
debug3: safely_chroot: checking '/'
debug3: safely_chroot: checking '/home/'
debug3: safely_chroot: checking '/home/user'
Changed root directory to "/home/user"
debug1: permanently_set_uid: 1000/100
debug3: monitor_apply_keystate: packet_set_state
debug2: ssh_set_newkeys: mode 0
debug1: rekey in after 4294967296 blocks
debug2: ssh_set_newkeys: mode 1
debug1: rekey out after 4294967296 blocks
debug1: ssh_packet_set_postauth: called
debug3: ssh_packet_set_state: done
debug3: notify_hostkeys: key 0: ssh-ed25519 SHA256:R8fUklYxWuLSfb+VbQsqQ8glzwUZOQ0duDrAtpQ2Fr0
debug3: notify_hostkeys: key 1: ssh-rsa SHA256:kFSxlPt7gupO2Msc0HFOH9fFIO1GEhScZpoinBHyro4
debug3: notify_hostkeys: sent 2 hostkeys
debug3: send packet: type 80
debug1: active: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch
debug3: receive packet: type 90
debug1: server_input_channel_open: ctype session rchan 256 win 2147483647 max 16384
debug1: input_session_request
debug1: channel 0: new session [server-session] (inactive timeout: 0)
debug2: session_new: allocate (allocated 0 max 10)
debug3: session_unused: session id 0 unused
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug3: send packet: type 91
debug3: receive packet: type 98
debug1: server_input_channel_req: channel 0 request [email protected] reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req [email protected]
debug3: receive packet: type 98
debug1: server_input_channel_req: channel 0 request shell reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
debug2: channel_set_xtype: labeled channel 0 as session:shell (inactive timeout 0)
Starting session: forced-command (config) 'internal-sftp' for user from 192.168.0.2 port 51034 id 0
debug2: fd 4 setting TCP_NODELAY
debug3: set_sock_tos: set socket 4 IP_TOS 0x20
debug2: fd 8 setting O_NONBLOCK
debug2: fd 7 setting O_NONBLOCK
debug2: fd 10 setting O_NONBLOCK
debug3: send packet: type 99
@nitwhiz
Copy link

nitwhiz commented Jul 26, 2023

sounds like #341?

does adding

ulimits:
  nofile:
    soft: 65536
    hard: 65536

to the service help?

@vagkaefer
Copy link

Exact same situation in here, i tried a lot of things, the ulimits solved! Thank you

@zorbla
Copy link

zorbla commented Sep 12, 2024

The issue does only occur with the alpine based image, does it?

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

3 participants