Skip to content
railway ssh closes right after key passphrase on Limited Trial (Postgres template)
Anonymous
OP

an hour ago

Hi, I'm on the Limited Trial plan with one project containing only the official PostgreSQL 16 template service (Online, private, no public TCP proxy). Railway CLI 5.77.1 on macOS.

My SSH key is registered (railway ssh keys shows it). When I run:

railway ssh --service Postgres -- echo hello

it asks for my key passphrase, then immediately prints "Connection closed by ... port 22". No shell and no output. Running it without a command closes the same way.

  1. Does the Limited Trial plan allow railway ssh? If not, which plan enables it?
  2. If it should work, what typically causes the session to close right after authentication, and how can I check it?

Thanks!

Awaiting User Response

5 Replies

Railway
BOT

an hour ago

Thanks for the clear write-up, and sorry the session is dropping right after you unlock your key.

Your trial workspace is active and your Postgres service is online with a successful deployment. When both of those hold, a session that closes like this involves the local computer or network environment the connection runs from, and troubleshooting that environment is outside the scope of Railway support.

On the plan question, the trial includes the same features as Hobby, with 1 GB of RAM and shared vCPU. The Limited Trial adds restrictions on your services' outbound network access and available ports. You can start verification for the Full Trial at any time at railway.com/verify, or upgrade to Hobby from the Plans page.


Status changed to Awaiting User Response Railway • about 1 hour ago


Anonymous
OP

an hour ago

Thanks. Authentication itself works (the passphrase prompt appears and the key is accepted), so the network path to ssh.railway.com seems fine. Could a Railway team member please confirm:

  1. Is railway ssh into a private PostgreSQL template service, including local port forwarding, supported on the Limited Trial?
  2. If not, is this caused by the Limited Trial's restricted outbound network/ports, and does upgrading to Hobby remove that specific restriction?

Thanks!


Status changed to Awaiting Railway Response Railway • about 1 hour ago


Railway
BOT

an hour ago

We don't have any plan requirement listed for railway ssh. The SSH docs describe shell access and local port forwarding with ssh -L for deployed services in general, with forwarding limited to the container's own loopback and your project's private network.

The Limited Trial restrictions apply to your services' own outbound network access and available ports. We can't confirm that they cause the session to close, or that upgrading to Hobby would change it. With your workspace active and your Postgres service online, a session that closes right after your key is accepted falls under the local computer and network troubleshooting our earlier reply described, which is outside what Railway support covers.


Status changed to Awaiting User Response Railway • about 1 hour ago


Railway

We don't have any plan requirement listed for `railway ssh`. The [SSH docs](https://docs.railway.com/cli/ssh) describe shell access and local port forwarding with `ssh -L` for deployed services in general, with forwarding limited to the container's own loopback and your project's private network. The Limited Trial restrictions apply to your services' own outbound network access and available ports. We can't confirm that they cause the session to close, or that upgrading to Hobby would change it. With your workspace active and your Postgres service online, a session that closes right after your key is accepted falls under the local computer and network troubleshooting our earlier reply described, which is outside what Railway support covers.

Anonymous
OP

an hour ago

I still need help from a Railway team member, please. The AI answer can't confirm the cause, and authentication succeeds before the session closes, so it doesn't look like a local network issue. Happy to run any diagnostic you suggest.


Status changed to Awaiting Railway Response Railway • about 1 hour ago


Railway
BOT

an hour ago

We understand you need a clear answer here, and we're sorry our earlier replies left it open-ended.

We don't have a plan requirement listed for railway ssh, and the Limited Trial restrictions cover your services' own outbound network access and ports, so we can't point to them as the reason the session closes or say that upgrading would change it. Your trial workspace is active and your Postgres service is running on a successful deployment. With both of those in place, a session that closes after your key is accepted involves the local computer or network environment the connection runs from, and troubleshooting that environment is outside the scope of Railway support, so we don't have further diagnostics to suggest for it.


Status changed to Awaiting User Response Railway • about 1 hour ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...