Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. SSH to custom application from outside with key

SSH to custom application from outside with key

Scheduled Pinned Locked Moved Solved Support
ssh
5 Posts 2 Posters 767 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aleksandr.s
    wrote on last edited by girish
    #1

    Hi there,
    I have created a custom app and tested it locally, I can connect to the container of this app on local environment via ssh with key.
    Then I have installed this app on our Cloudron server and tested it via terminal from Cloudron dasbhoard and via the Cloudron cli, it works fine - I can connect to it, but when I try login via ssh to this app from outside it asks me password (I have not specified any password for any user in this app) and I can't connect to it. Is it possible to configure this app so to allow to connect via ssh to it with key?

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      On Cloudron the apps run inside their own docker container. Unless there is an sshd running on a custom port which is exposed via the CloudronManifest.json, there is no way to connect directly via ssh to it. You would have to ssh onto the host system and then use docker exec to get a terminal via ssh into the app.

      What exactly are you trying to achieve? Maybe there are better options depending on the use-case.

      1 Reply Last reply
      0
      • girishG girish marked this topic as a question on
      • A Offline
        A Offline
        aleksandr.s
        wrote on last edited by
        #3

        our custom app run Cypress tests which will be started via gitlab-pipeline, which should ssh to this app and run them

        Unless there is an sshd running on a custom port which is exposed via the CloudronManifest.json, there is no way to connect directly via ssh to it.

        if I correctly understood, I can specify port 22 in CloudronManifest.json and the custom app will be available for ssh from outside?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aleksandr.s
          wrote on last edited by
          #4

          if I correctly understood, I can specify port 22 in CloudronManifest.json and the custom app will be available for ssh from outside?

          yes, I properly understood you, but I have specified other port in CloudronManifest.json, on first try I have specified 22 port and got the error:

          2023-12-29-18-28-15.png

          Failed to install app: 400 message: Port 22 for SSH_PORT is reserved in portBindings

          on the second try I specified 202 port and got the similar error:

          2023-12-29-18-27-45.png

          Failed to install app: 400 message: Port 202 for SSH_PORT is reserved in portBindings

          finally I have tried to specify 20202 port and it is worked, I can ssh to this app from outside.

          2023-12-29-18-30-18.png

          Thank you!

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #5

            Glad you sorted it out. And interesting that your second attempt was 202 which is also what you picked as a default alternative to 22 🙂

            1 Reply Last reply
            0
            • nebulonN nebulon has marked this topic as solved on
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search