-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(backend): Instances deployment started
- Loading branch information
1 parent
183741b
commit 85feddb
Showing
8 changed files
with
901 additions
and
843 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import io | ||
|
||
import paramiko | ||
|
||
|
||
def generate_ssh_key_pair() -> tuple[str, str]: | ||
# Generate RSA key pair | ||
key = paramiko.RSAKey.generate(4096) | ||
|
||
# Serialize private key to string | ||
private_key_io = io.StringIO() | ||
key.write_private_key(private_key_io) | ||
private_key_str = private_key_io.getvalue() | ||
|
||
# Generate public key in OpenSSH format | ||
public_key_str = f"{key.get_name()} {key.get_base64()}" | ||
|
||
return private_key_str, public_key_str |
This file contains 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
Oops, something went wrong.