[Feature]: Store user SSH key on the server #3176
Merged
peterschmidt85 merged 6 commits intomasterfrom Oct 15, 2025
Merged
Conversation
jvstme
approved these changes
Oct 14, 2025
Comment on lines
+294
to
+297
| warn( | ||
| f"Using legacy [code]{config_manager.dstack_key_path}[/code]." | ||
| " Future versions will use the user SSH key from the server.", | ||
| ) |
Collaborator
There was a problem hiding this comment.
Is the user supposed to do anything when they see this warning? If not, the warning is unnecessary and will probably only confuse the user, since they typically don't think about what keys dstack uses internally
Contributor
Author
There was a problem hiding this comment.
Decided to keep the warning for now, but we can remove it in a separate PR once we’ve dogfooded it more.
Collaborator
There was a problem hiding this comment.
I think seeing it on every apply and attach and not being able to do anything about it will be a bit annoying. Anyways, it's up to you
Co-authored-by: jvstme <36324149+jvstme@users.noreply.github.com>
Review: move `ssh_public_key` to `User` model (from `UserWithCreds`)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2053
ssh_private_keyandssh_public_key. These properties are automatically assigned when users are created or when a user submits a run without specifying a public key.Warning
The CLI still assigns the public key from the legacy local SSH key. However, if a run was submitted without an SSH key (for example, via the API and automatically assigned the user’s public key), the new CLI will be able to attach to it using the user’s key.
Backward compatibility:
Warning
Since 0.19.40, the client will stop using the legacy local SSH key and will require that all users have updated their servers to at least 0.19.33.