Feedback: SSH

We've had SSH support for a while, but the old implementation was a custom protocol the Railway team built over a WebSocket relay. It worked, but it also meant a bunch of standard SSH features just didn't.

The new implementation is a standard SSH connection. Anything that speaks SSH speaks Railway: your existing ssh client, ~/.ssh/config entries, ProxyJump, port forwarding, SCP, SFTP, and identity files all work the way you'd expect.

To get started:

1. Generate a key pair locally

2. Upload the public key on the SSH keys page

3. Connect by running ssh <service-domain>@ssh.railway.com

Alternatively, you can use the Railway CLI. From the dashboard, right-click a service and select Copy SSH command to drop it straight into your terminal. (Make sure you're on the latest version by running railway upgrade first).

Check out the railway ssh docs, and if you run into any issues, please let us know in this thread 🙏🏼

Under Review

0 Threads mention this feature

6 Replies

kazwolfe
PRO

15 days ago

I use a Yubikey for SSH via gpg-agent, which is no longer detected by this new mechanism. As such, I'm effectively locked out from using my normal SSH keys until I generate a new one.

Please consider adding SSH agent support rather than manually dealing with identity files.


kazwolfe

I use a Yubikey for SSH via `gpg-agent`, which is no longer detected by this new mechanism. As such, I'm effectively locked out from using my normal SSH keys until I generate a new one. Please consider adding SSH agent support rather than manually dealing with identity files.

lawrencegripperwrk
EMPLOYEE

13 days ago

Hi,

Sorry you hit this, is this occuring when you use railway ssh? If so hopefully have a nice fix for you 🤞 The new SSH implementation allows a native connection with your preferred SSH client and setup via ssh <service-domain>@ssh.railway.com which should pickup keys from your configured ssh-agent. Does this correctly pickup your pgp-agent?


8 days ago

Is it possible for me to pipe things to the remote server using railway ssh? I'm really needing a way to scp files to my service and I'm trying to figure out whether I can use railway scp, even if it takes a trickier command or piping somehow.


zicklag

Is it possible for me to pipe things to the remote server using `railway ssh`? I'm really needing a way to scp files to my service and I'm trying to figure out whether I can use railway scp, even if it takes a trickier command or piping somehow.

8 days ago

Oh, wait, nevermind, I just saw that your docs in the OP above are different than what I was seeing in the normal ssh docs, I've got to try that!


8 days ago

OK yeah, this is huge thanks a ton for this feature!!

I can finally migrate my data to railway much easier with scp instead of having to move the volume and setup a jumpserver, etc. ❤‍🔥


lawrencegripperwrk

Hi, Sorry you hit this, is this occuring when you use `railway ssh`? If so hopefully have a nice fix for you 🤞 The new SSH implementation allows a native connection with your preferred SSH client and setup via `ssh <service-domain>@ssh.railway.com` which should pickup keys from your configured ssh-agent. Does this correctly pickup your pgp-agent?

kazwolfe
PRO

7 days ago

Thanks for checking on it! Yeah, that happens through railway ssh.

Yep, ssh <service>@ssh.railway.com does work and does pick up my agent (as it's configured to do so). How would I connect to a private service (so, one without a service domain)?

Aside for anyone else reading this: the service domain is the hostname that your target service is hosted from.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...