Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store project's ssh keys in DB #658

Merged
merged 3 commits into from
Aug 17, 2023
Merged

Store project's ssh keys in DB #658

merged 3 commits into from
Aug 17, 2023

Conversation

Egor-S
Copy link
Contributor

@Egor-S Egor-S commented Aug 17, 2023

Closes #652

  • Add SSH key pair to project model in DB
  • Add migration for SSH keys generation
  • Use the project's ssh key for gateway creation and service publication
  • LambdaLabs still uses hub_ssh_key

Script for coping existing keys to the database:

cd ~/.dstack/server
export PROJECT=main
export PRIVATE_KEY=$(cat ssh/hub_ssh_key)
export PUBLIC_KEY=$(cat ssh/hub_ssh_key.pub)
sqlite3 data/sqlite.db "UPDATE projects SET ssh_private_key='$PRIVATE_KEY', ssh_public_key='$PUBLIC_KEY' WHERE name='$PROJECT'"

@Egor-S Egor-S merged commit c9e1510 into master Aug 17, 2023
32 checks passed
@Egor-S Egor-S deleted the issue_652_ssh_key_in_db branch August 17, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store the server's SSH key in the SQLite database
1 participant