SSH to custom application from outside with key
-
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? -
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.
-
-
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?
-
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:
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:
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.
Thank you!
-