Dagger
Search

ssh

Run remote server commands using SSH

Installation

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

Entrypoint

Return Type
Ssh
Example
func (m *myModule) 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
func (m *myModule) 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
func (m *myModule) 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
func (m *myModule) 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
func (m *myModule) example(destination string, arg *Secret, arg1 string) *Container  {
	return dag.
			Ssh().
			Config(destination).
			WithIdentityFile(arg).
			Command(arg1)
}