Dagger
Search

ssh

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/riftonix/daggerverse/modules/ssh@875bc512cdced2a013cfbbe891ea858f710129ca

Entrypoint

Return Type
Ssh !
Arguments
NameTypeDefault ValueDescription
imageRegistryString "docker.io"Helm image registry
imageRepositoryString "kroniak/ssh-client"Helm image repositroy
imageTagString "3.21"Helm image tag
userIdString "65532"Helm image user
Example
dagger -m github.com/riftonix/daggerverse/modules/ssh@875bc512cdced2a013cfbbe891ea858f710129ca call \
func (m *MyModule) Example() *dagger.Ssh  {
	return dag.
			Ssh()
}
@function
def example() -> dagger.Ssh:
	return (
		dag.ssh()
	)
@func()
example(): Ssh {
	return dag
		.ssh()
}

Types

Ssh 🔗

SSH dagger module

container() 🔗

Get the base container for the SSH module.

Return Type
Container !
Example
dagger -m github.com/riftonix/daggerverse/modules/ssh@875bc512cdced2a013cfbbe891ea858f710129ca call \
 container
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Ssh().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.ssh()
		.container()
	)
@func()
example(): Container {
	return dag
		.ssh()
		.container()
}

exec() 🔗

Functions for helm chart linting

Return Type
String !
Arguments
NameTypeDefault ValueDescription
destinationString !-Address to connect for ssh client
sshPortInteger !22Destination port
sshUserString !"root"Ssh user
insecureSshPasswordString !""Ssh password, that can be visible in the logs
sshCmdString !"uname -a"Command for remote exec
Example
dagger -m github.com/riftonix/daggerverse/modules/ssh@875bc512cdced2a013cfbbe891ea858f710129ca call \
 exec --destination string --ssh-port integer --ssh-user string --insecure-ssh-password string --ssh-cmd string
func (m *MyModule) Example(ctx context.Context, destination string, sshPort int, sshUser string, insecureSshPassword string, sshCmd string) string  {
	return dag.
			Ssh().
			Exec(ctx, destination, sshPort, sshUser, insecureSshPassword, sshCmd)
}
@function
async def example(destination: str, ssh_port: int, ssh_user: str, insecure_ssh_password: str, ssh_cmd: str) -> str:
	return await (
		dag.ssh()
		.exec(destination, ssh_port, ssh_user, insecure_ssh_password, ssh_cmd)
	)
@func()
async example(destination: string, sshPort: number, sshUser: string, insecureSshPassword: string, sshCmd: string): Promise<string> {
	return dag
		.ssh()
		.exec(destination, sshPort, sshUser, insecureSshPassword, sshCmd)
}

withPrivateKey() 🔗

Add private key to container

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceFile !-Private key file
Example
dagger -m github.com/riftonix/daggerverse/modules/ssh@875bc512cdced2a013cfbbe891ea858f710129ca call \
 with-private-key --source file:path
func (m *MyModule) Example(ctx context.Context, source *dagger.File) string  {
	return dag.
			Ssh().
			WithPrivateKey(ctx, source)
}
@function
async def example(source: dagger.File) -> str:
	return await (
		dag.ssh()
		.with_private_key(source)
	)
@func()
async example(source: File): Promise<string> {
	return dag
		.ssh()
		.withPrivateKey(source)
}