Dagger
Search

ssh

SSH in with a password or IdentityFile to execute commands on the remote server.

Installation

dagger install github.com/seungyeop-lee/daggerverse/ssh@v0.1.1

Entrypoint

Return Type
Ssh
Example
func (m *myModule) example() *Ssh  {
	return dag.
			Ssh()
}
@function
def example() -> dag.Ssh:
	return (
		dag.ssh()
	)
@func()
example(): Ssh {
	return dag
		.ssh()
}

Types

Ssh

SSH dagger module

config()

Set configuration for SSH connections.

Return Type
Config !
Arguments
NameTypeDefault ValueDescription
destinationString !-destination to connect ex) user@host
portInteger 22port to connect
Example
dagger -m github.com/seungyeop-lee/daggerverse/ssh@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-password --arg env:MYSECRET \
 command --arg string
func (m *myModule) example(destination string) *SshConfig  {
	return dag.
			Ssh().
			Config(destination)
}
@function
def example(destination: str) -> dag.SshConfig:
	return (
		dag.ssh()
		.config(destination)
	)
@func()
example(destination: string): SshConfig {
	return dag
		.ssh()
		.config(destination)
}

Config

SSH configuration

withPassword()

Set the password as the SSH connection credentials.

Return Type
Commander !
Arguments
NameTypeDefault ValueDescription
argSecret !-password
Example
dagger -m github.com/seungyeop-lee/daggerverse/ssh@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-password --arg env:MYSECRET \
 command --arg string
func (m *myModule) example(destination string, arg *Secret) *SshCommander  {
	return dag.
			Ssh().
			Config(destination).
			WithPassword(arg)
}
@function
def example(destination: str, arg: dagger.Secret) -> dag.SshCommander:
	return (
		dag.ssh()
		.config(destination)
		.with_password(arg)
	)
@func()
example(destination: string, arg: Secret): SshCommander {
	return dag
		.ssh()
		.config(destination)
		.withPassword(arg)
}

withIdentityFile()

Set up identity file with SSH connection credentials.

Return Type
Commander !
Arguments
NameTypeDefault ValueDescription
argSecret !-identity file
Example
dagger -m github.com/seungyeop-lee/daggerverse/ssh@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-identity-file --arg env:MYSECRET \
 command --arg string
func (m *myModule) example(destination string, arg *Secret) *SshCommander  {
	return dag.
			Ssh().
			Config(destination).
			WithIdentityFile(arg)
}
@function
def example(destination: str, arg: dagger.Secret) -> dag.SshCommander:
	return (
		dag.ssh()
		.config(destination)
		.with_identity_file(arg)
	)
@func()
example(destination: string, arg: Secret): SshCommander {
	return dag
		.ssh()
		.config(destination)
		.withIdentityFile(arg)
}

Commander

SSH command launcher

command()

Run the command on the remote server.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
argString !-command
Example
dagger -m github.com/seungyeop-lee/daggerverse/ssh@4ba108db8397e7c2739ca89616a57100da858e07 call \
 config --destination string \
 with-identity-file --arg env:MYSECRET \
 command --arg string
func (m *myModule) example(destination string, arg *Secret, arg1 string) *Container  {
	return dag.
			Ssh().
			Config(destination).
			WithIdentityFile(arg).
			Command(arg1)
}
@function
def example(destination: str, arg: dagger.Secret, arg1: str) -> dagger.Container:
	return (
		dag.ssh()
		.config(destination)
		.with_identity_file(arg)
		.command(arg1)
	)
@func()
example(destination: string, arg: Secret, arg1: string): Container {
	return dag
		.ssh()
		.config(destination)
		.withIdentityFile(arg)
		.command(arg1)
}