Connection to ssh.railway.com closed
erichier
PROOP

10 days ago

I would need to connect to https://railway.com/project/f45e1eb8-7b4e-4512-9f90-865e35afe4ca/service/7a1bdc98-d442-4ba5-af95-91c9e2b83ab6?environmentId=b241b85d-0b10-4788-a5c4-90070ba2cea9 via SSH to debug file permissions. When using the SSH command (fresh railway cli npm install) with SSH keys associated with the account, I am getting the error "Connection to ssh.railway.com closed". This happens both on my Windows Desktop as well as an Ubuntu VM on Hetzner with no change in network configuration. Can you please help me debug that issue?

Solved$20 Bounty

Pinned Solution

andrewkat52
FREE

10 days ago

yeah your container image doesn't have a shell installed and railway ssh requires either /bin/sh or /bin/bash to exist in the container to work you need to switch to a base image that includes a shell (like debian:slim or alpine) and redeploy then ssh will work fine

4 Replies

Railway
BOT

10 days ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway 10 days ago


andrewkat52
FREE

10 days ago

Hey , run railway ssh keys list to confirm your key is actually registered with railway if it shows up try forcing it explicitly with railway ssh -i /path/to/your/private/key


andrewkat52

Hey , run `railway ssh keys list` to confirm your key is actually registered with railway if it shows up try forcing it explicitly with `railway ssh -i /path/to/your/private/key`

erichier
PROOP

10 days ago

That key is registered and when give that a try I get: Error: crun: executable file sh not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found Connection to ssh.railway.com closed. on both the VM as well as my Windows installation.


erichier

That key is registered and when give that a try I get: _Error: crun: executable file_ `sh` _not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found Connection to_ [_ssh.railway.com_](http://ssh.railway.com) _closed._ on both the VM as well as my Windows installation.

andrewkat52
FREE

10 days ago

yeah your container image doesn't have a shell installed and railway ssh requires either /bin/sh or /bin/bash to exist in the container to work you need to switch to a base image that includes a shell (like debian:slim or alpine) and redeploy then ssh will work fine


andrewkat52

yeah your container image doesn't have a shell installed and railway ssh requires either `/bin/sh` or `/bin/bash` to exist in the container to work you need to switch to a base image that includes a shell (like `debian:slim` or `alpine`) and redeploy then ssh will work fine

erichier
PROOP

10 days ago

Aah, thank you for pointing that out – I was unaware of that. I would suggest disabling the "Copy SSH command" in the context menu for containers without /bin/sh with a link to a documentation on that – I probably won't be the last one with that issue. Thank you for your support!


Status changed to Open brody 9 days ago


Status changed to Solved 0x5b62656e5d 9 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...