ssh
Run remote server commands using SSH
Installation
dagger install github.com/seungyeop-lee/daggerverse/ssh@v0.1.0
Types
Ssh 🔗
SSH dagger module
config() 🔗
Set configuration for SSH connections.
Return Type
Config !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
destination | String ! | - | destination to connect ex) user@host |
port | Integer | 22 | port 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
Name | Type | Default Value | Description |
---|---|---|---|
arg | Secret ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
arg | Secret ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
arg | String ! | - | command |
Example
func (m *myModule) example(destination string, arg *Secret, arg1 string) *Container {
return dag.
Ssh().
Config(destination).
WithIdentityFile(arg).
Command(arg1)
}