Railway CLI logged in but unable to perform some commands
gerald-dt
PROOP

4 months ago

Hello, I am trying to ssh into my project with railway ssh to run commands but am unable to. Logging in works correctly and allows some commands to run but not all of them. Path that I have taken:

  • I have logged in with railway login

  • I have linked and selected a workspace, project, environment, and service with railway link

  • Running railway status shows me the expected project, environment, and service

  • Running railway whoami shows that I am logged in

  • A cursory check of the ~/.railway/config.json has the expected fields above and a user token

However, when I run railway ssh, I get the following error with no further details:
Expected welcome message, received: ServerMessage { type: "error", payload: ServerPayload { data: Empty, message: "Authentication failed", code: None } }

And when I run railway run, it leads me to think that I have not logged in as I see Unauthorized. Please login with `railway login`

Despite these 2 commands saying unauthorized, I can still run other railway commands such as link, status, and whoami and get the expected results that I should only see if I am logged in.

I have tried the usual logout and login as well as deleting the .railway directory. So any troubleshooting tips are greatly appreciated.

System details:

M1 Mac on Sequoia 15.6.1

Railway version: railway 4.11.0

Shell: Mac default zsh terminal

Solved

8 Replies

Railway
BOT

4 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


Hey Gerald,

Sorry for the delay to action on this for you. We just shipped a fix to this bug. We recently updated a number of permissions on the platform but accidentally restricted too much of them that ended up closing the SSH ability for a few customers. Can you try now?


Status changed to Awaiting User Response Railway 4 months ago


angelo-railway

Hey Gerald,Sorry for the delay to action on this for you. We just shipped a fix to this bug. We recently updated a number of permissions on the platform but accidentally restricted too much of them that ended up closing the SSH ability for a few customers. Can you try now?

gerald-dt
PROOP

4 months ago

Hey Angelo,

Thanks for the response! I've retried this and I am still running into the same issue. Have also retried clearing the ./railway/config.json and railway logout but no luck


Status changed to Awaiting Railway Response Railway 4 months ago


Railway
BOT

4 months ago

Hello!

We've escalated your issue to our engineering team.

We aim to provide an update within 1 business day.

Please reply to this thread if you have any questions!

Status changed to Awaiting User Response Railway 4 months ago


All good then, going to escalate the bug to the team then. Apologies for the impact.


Railway
BOT

4 months ago

🛠️ The ticket Connection issue with SSH authentication has been marked as in progress.


Railway
BOT

4 months ago

✅ The ticket Connection issue with SSH authentication has been marked as completed.


Okay Gerald, we shipped a better error message for the login failiure. Can you try now?


gerald-dt
PROOP

4 months ago

The error message was much more clear and I was able to resolve my issue. Thank you!

Leaving a note here of the new error message so others are able to search for this: Expected welcome message, received: ServerMessage { type: "error", payload: ServerPayload { data: Empty, message: "Insufficient permissions: Railway SSH requires the MEMBER role. Ask a project admin to grant you Member access, or provide you with a project token.", code: None } }


Status changed to Awaiting Railway Response Railway 4 months ago


Status changed to Solved gerald-dt 4 months ago


Loading...