a month ago
Hello Railway Community,
I’m trying to inspect existing files in a running Railway service before attaching persistent storage. The service has no Volume and may contain administrator knowledge and policy history that must be preserved, so restarting or redeploying before verifying the data is not acceptable.
Environment:
- Railway CLI 5.69.0 on Windows with OpenSSH
-
- Registered ED25519 key; local and account key fingerprints match
-
- The deployed Dockerfile uses node:20-alpine and starts node server.js; whether /bin/sh exists in the running container is unverified
SSH behavior:
- The connection reaches ssh.railway.com
-
- The server accepts the offered public key
-
- The client signs and sends the authentication request
-
- The connection closes before SSH authentication success is received
-
- This occurred through both the Railway CLI and direct OpenSSH
The supported “railway service files list” command is available, but in my non-interactive environment it cannot load the passphrase-protected private key, so it does not reach the service file listing step.
I have not changed or restarted the deployment and have not modified or exported its data.
Questions:
- What could cause the gateway to close after the signed public-key request?
- Could a missing shell cause this behavior, and can that be checked without restarting or redeploying?
- Is there a supported way to use a passphrase-protected key with “railway service files list” non-interactively?
- Is there a supported read-only way to inspect files on the current running instance without restarting or redeploying?
- What additional sanitized diagnostics would help?
I need to preserve existing application knowledge and policy history before moving to persistent storage. Thank you.
1 Reply
a month ago
There's no environment variable or flag that passes a key passphrase to railway service files list. In a non-interactive run, the CLI can use a key that's already loaded in an SSH agent (Pageant on Windows), or an unencrypted key registered with railway ssh keys add --key <path>. You can also run the command from an interactive terminal, where it asks for the passphrase.
File listing and transfers run over SFTP, which doesn't start a shell in the container. A missing /bin/sh would only affect interactive railway ssh sessions and railway ssh -- <command>, not the file commands or plain scp/sftp.
To look at the running instance without restarting or redeploying, open the service's Console tab in the dashboard and use the Files panel next to it. That panel browses the container filesystem and downloads files straight to your machine. Once SSH authenticates, scp/sftp against ssh.railway.com also work, with the service's domain as the username, and scp -r copies a whole directory.
Your workspace audit logs at railway.com/workspace/audit-logs show the container access and SSH session events that were recorded. Without a volume, the container's files are lost on any restart or redeploy, so copying them off before attaching storage is the right order.
Status changed to Awaiting User Response Railway • about 1 month ago
24 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 24 days ago