Dagger
Search

ssh-manager

SSH Manager module for generating secure SSH key pairs and configurations.

Installation

dagger install github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019

Entrypoint

Return Type
SshManager
Example
dagger -m github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019 call \
func (m *MyModule) Example() *dagger.SshManager  {
	return dag.
			SshManager()
}
@function
def example() -> dagger.SshManager:
	return (
		dag.ssh_manager()
	)
@func()
example(): SshManager {
	return dag
		.sshManager()
}

Types

SshManager 🔗

SshManager provides services to generate and manage SSH identities.

generateEcdsa() 🔗

GenerateEcdsa creates a new ECDSA SSH key pair.

Return Type
SshManagerKeyResult !
Arguments
NameTypeDefault ValueDescription
remoteHostString !-The remote host address (e.g., github.com).
remoteUserString !-The user name on the remote host.
localHostnameString "dagger"The hostname of the local machine used for key naming.
bitsInteger 521The bit size for the ECDSA curve (256, 384, or 521).
autoPassphraseBoolean -Automatically generate a 32-character passphrase for the private key.
existingConfigFile -An existing SSH config file to append the new configuration to.
Example
dagger -m github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019 call \
 generate-ecdsa --remote-host string --remote-user string
func (m *MyModule) Example(remoteHost string, remoteUser string) *dagger.SshManagerKeyResult  {
	return dag.
			SshManager().
			GenerateEcdsa(remoteHost, remoteUser)
}
@function
def example(remote_host: str, remote_user: str) -> dagger.SshManagerKeyResult:
	return (
		dag.ssh_manager()
		.generate_ecdsa(remote_host, remote_user)
	)
@func()
example(remoteHost: string, remoteUser: string): SshManagerKeyResult {
	return dag
		.sshManager()
		.generateEcdsa(remoteHost, remoteUser)
}

generateEd25519() 🔗

GenerateEd25519 creates a new Ed25519 SSH key pair. This is the recommended modern algorithm.

Return Type
SshManagerKeyResult !
Arguments
NameTypeDefault ValueDescription
remoteHostString !-The remote host address (e.g., github.com).
remoteUserString !-The user name on the remote host.
localHostnameString "dagger"The hostname of the local machine used for key naming.
autoPassphraseBoolean -Automatically generate a 32-character passphrase for the private key.
existingConfigFile -An existing SSH config file to append the new configuration to.
Example
dagger -m github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019 call \
 generate-ed-2-5-5-1-9 --remote-host string --remote-user string
func (m *MyModule) Example(remoteHost string, remoteUser string) *dagger.SshManagerKeyResult  {
	return dag.
			SshManager().
			GenerateEd25519(remoteHost, remoteUser)
}
@function
def example(remote_host: str, remote_user: str) -> dagger.SshManagerKeyResult:
	return (
		dag.ssh_manager()
		.generate_ed25519(remote_host, remote_user)
	)
@func()
example(remoteHost: string, remoteUser: string): SshManagerKeyResult {
	return dag
		.sshManager()
		.generateEd25519(remoteHost, remoteUser)
}

generateRsa() 🔗

GenerateRsa creates a new RSA SSH key pair.

Return Type
SshManagerKeyResult !
Arguments
NameTypeDefault ValueDescription
remoteHostString !-The remote host address (e.g., github.com).
remoteUserString !-The user name on the remote host.
localHostnameString "dagger"The hostname of the local machine used for key naming.
bitsInteger 4096The bit length for the RSA key.
autoPassphraseBoolean -Automatically generate a 32-character passphrase for the private key.
existingConfigFile -An existing SSH config file to append the new configuration to.
Example
dagger -m github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019 call \
 generate-rsa --remote-host string --remote-user string
func (m *MyModule) Example(remoteHost string, remoteUser string) *dagger.SshManagerKeyResult  {
	return dag.
			SshManager().
			GenerateRsa(remoteHost, remoteUser)
}
@function
def example(remote_host: str, remote_user: str) -> dagger.SshManagerKeyResult:
	return (
		dag.ssh_manager()
		.generate_rsa(remote_host, remote_user)
	)
@func()
example(remoteHost: string, remoteUser: string): SshManagerKeyResult {
	return dag
		.sshManager()
		.generateRsa(remoteHost, remoteUser)
}

SshManagerKeyResult 🔗

KeyResult represents the collection of generated SSH components.

publicKey() 🔗

The OpenSSH formatted public key file.

Return Type
File !
Example
dagger -m github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019 call \
 generate-rsa --remote-host string --remote-user string \
 public-key
func (m *MyModule) Example(remoteHost string, remoteUser string) *dagger.File  {
	return dag.
			SshManager().
			GenerateRsa(remoteHost, remoteUser).
			PublicKey()
}
@function
def example(remote_host: str, remote_user: str) -> dagger.File:
	return (
		dag.ssh_manager()
		.generate_rsa(remote_host, remote_user)
		.public_key()
	)
@func()
example(remoteHost: string, remoteUser: string): File {
	return dag
		.sshManager()
		.generateRsa(remoteHost, remoteUser)
		.publicKey()
}

privateKey() 🔗

The OpenSSH formatted private key, stored as a secret.

Return Type
Secret !
Example
dagger -m github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019 call \
 generate-rsa --remote-host string --remote-user string \
 private-key
func (m *MyModule) Example(remoteHost string, remoteUser string) *dagger.Secret  {
	return dag.
			SshManager().
			GenerateRsa(remoteHost, remoteUser).
			PrivateKey()
}
@function
def example(remote_host: str, remote_user: str) -> dagger.Secret:
	return (
		dag.ssh_manager()
		.generate_rsa(remote_host, remote_user)
		.private_key()
	)
@func()
example(remoteHost: string, remoteUser: string): Secret {
	return dag
		.sshManager()
		.generateRsa(remoteHost, remoteUser)
		.privateKey()
}

config() 🔗

The SSH configuration file containing host and proxy settings.

Return Type
File !
Example
dagger -m github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019 call \
 generate-rsa --remote-host string --remote-user string \
 config
func (m *MyModule) Example(remoteHost string, remoteUser string) *dagger.File  {
	return dag.
			SshManager().
			GenerateRsa(remoteHost, remoteUser).
			Config()
}
@function
def example(remote_host: str, remote_user: str) -> dagger.File:
	return (
		dag.ssh_manager()
		.generate_rsa(remote_host, remote_user)
		.config()
	)
@func()
example(remoteHost: string, remoteUser: string): File {
	return dag
		.sshManager()
		.generateRsa(remoteHost, remoteUser)
		.config()
}

files() 🔗

A directory containing the private key, public key, and config for easy export.

Return Type
Directory !
Example
dagger -m github.com/softwaredevelop/daggerverse/ssh-manager@3325e9ea2638001750fdc6ed69a6adf081b96019 call \
 generate-rsa --remote-host string --remote-user string \
 files
func (m *MyModule) Example(remoteHost string, remoteUser string) *dagger.Directory  {
	return dag.
			SshManager().
			GenerateRsa(remoteHost, remoteUser).
			Files()
}
@function
def example(remote_host: str, remote_user: str) -> dagger.Directory:
	return (
		dag.ssh_manager()
		.generate_rsa(remote_host, remote_user)
		.files()
	)
@func()
example(remoteHost: string, remoteUser: string): Directory {
	return dag
		.sshManager()
		.generateRsa(remoteHost, remoteUser)
		.files()
}