Skip to content

fix: connection to local server terminal#1066

Merged
Siumauricio merged 6 commits intoDokploy:canaryfrom
szwabodev:fix/localServerTerminal
Jan 10, 2025
Merged

fix: connection to local server terminal#1066
Siumauricio merged 6 commits intoDokploy:canaryfrom
szwabodev:fix/localServerTerminal

Conversation

@szwabodev
Copy link
Contributor

@szwabodev szwabodev commented Jan 6, 2025

  • added iproute2 to dependecies in Dockerfile (required for ip route command)
  • added util for checking if Dokploy is running in WSL
  • added util for getting Docker host IP
  • added command to allow access for local server terminal, which is displayed in the terminal when connection fails, after auto-generating private SSH key. This command must be run on the server manually by the user and is required only once to append the auto-generated SSH key to authorized_keys file on the server. Also added similar command for granting permission access to the /etc/dokploy/ssh directory when needed.
  • fixed the local server terminal connection host to use Docker host IP instead of localhost in production env
  • refactored error message for client authentication to be separated for local server/remote server

The last approach sadly only worked in local dev server, the new approach was tested locally on a built Docker image and Dokploy running inside Docker container instead of local dev server, and it connected fine.

Permission denied error with a command to fix it:
image

Access error for generated private SSH key with a command to authorize the key:
image

Successfull connection after running the above commands:
image

@szwabodev szwabodev changed the title Fix/local server terminal fix: connection to local server terminal Jan 6, 2025
@szwabodev szwabodev marked this pull request as ready for review January 6, 2025 12:16
@szwabodev szwabodev requested a review from Siumauricio as a code owner January 6, 2025 12:16
@Siumauricio Siumauricio merged commit 15fd663 into Dokploy:canary Jan 10, 2025
@Siumauricio Siumauricio mentioned this pull request Jan 13, 2025
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

Successfully merging this pull request may close these issues.

2 participants