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.2Entrypoint
Return Type
Ssh Example
dagger -m github.com/seungyeop-lee/daggerverse/ssh@78ef19f96d30a4c71490f87d07c317cd9a2c05cd 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
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
dagger -m github.com/seungyeop-lee/daggerverse/ssh@78ef19f96d30a4c71490f87d07c317cd9a2c05cd call \
config --destination stringfunc (m *MyModule) Example(destination string) *dagger.SshConfig {
return dag.
Ssh().
Config(destination)
}@function
def example(destination: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| arg | Secret ! | - | password |
Example
dagger -m github.com/seungyeop-lee/daggerverse/ssh@78ef19f96d30a4c71490f87d07c317cd9a2c05cd call \
config --destination string \
with-password --arg env:MYSECRETfunc (m *MyModule) Example(destination string, arg *dagger.Secret) *dagger.SshCommander {
return dag.
Ssh().
Config(destination).
WithPassword(arg)
}@function
def example(destination: str, arg: dagger.Secret) -> dagger.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.
Note: Recommend using RSA-formatted private key files. Cannot use OPENSSH-formatted private key files. https://github.com/dagger/dagger/issues/7220
Return Type
Commander !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| arg | Secret ! | - | identity file |
Example
dagger -m github.com/seungyeop-lee/daggerverse/ssh@78ef19f96d30a4c71490f87d07c317cd9a2c05cd call \
config --destination string \
with-identity-file --arg env:MYSECRETfunc (m *MyModule) Example(destination string, arg *dagger.Secret) *dagger.SshCommander {
return dag.
Ssh().
Config(destination).
WithIdentityFile(arg)
}@function
def example(destination: str, arg: dagger.Secret) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| arg | String ! | - | command |
Example
dagger -m github.com/seungyeop-lee/daggerverse/ssh@78ef19f96d30a4c71490f87d07c317cd9a2c05cd call \
config --destination string \
with-identity-file --arg env:MYSECRET \
command --arg stringfunc (m *MyModule) Example(destination string, arg *dagger.Secret, arg1 string) *dagger.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)
}