Skip to content

Connecting to a remote server doesn't work for self hosted server #2467

@Frits1980

Description

@Frits1980

To Reproduce

Test A:

  1. Create a SSH-key (both id25519 and idRSA tested) in Dokploy by pushing the generate button
  2. Put pub key in authorized_keys file of the root user on my docker server
  3. Add remote server to Dokploy
  4. Test by starting terminal

Test B:

  1. Create an SSH-key from the command line on the server which hosts Dokploy
  2. Put pub key in authorized_keys file of the root user on my docker server
  3. Put both pub key and private key in Dokploy instead of hitting the generate button
  4. Add remote server to Dokploy
  5. Test by starting terminal

Current vs. Expected behavior

Both tests end in:
Connecting...
SSH connection error: connect EHOSTUNREACH 10.0.1.112:22 ❌

Expected behaviour:
Connecting...
root@docker-server:

From the command line on my Dokploy server I can run ssh root@10.0.1.112 and it will login without problem.

Provide environment information

I run both servers on the same Mac M4 OS 15.5
Both in UTM version 4.6.5
In both servers I run Ubuntu 24.04.2 LTS
Dokploy version 0.24.12

Which area(s) are affected? (Select all that apply)

Remote server

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

My sshd_config file on the docker server

Port 22
ListenAddress 0.0.0.0
SyslogFacility AUTH
LogLevel DEBUG
PermitRootLogin without-password
# Tested PermitRootLogin also with "yes" and instead of "without-password"
PubkeyAuthentication yes
# Tested PubkeyAuthentication also with "no" instead of "yes"
AuthorizedKeysFile	.ssh/authorized_keys .ssh/authorized_keys2 /root/.ssh/authorized_keys
PasswordAuthentication yes
# Tested PasswordAuthentication also with "no" instead of "yes"
KbdInteractiveAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem	sftp	/usr/lib/openssh/sftp-server

Will you send a PR to fix it?

No

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions