openssh-server
OpenSSH server module for testing SSH connections.
Installation
dagger install github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e
Entrypoint
Return Type
OpensshServer !
Arguments
Name | Type | Description |
---|---|---|
container | Container | Custom container to use as a base container. OpenSSH server MUST be installed. |
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
func (m *myModule) example() *OpensshServer {
return dag.
OpensshServer()
}
@function
def example() -> dag.OpensshServer:
return (
dag.openssh_server()
)
@func()
example(): OpensshServer {
return dag
.opensshServer()
}
Types
OpensshServer 🔗
port() 🔗
Return Type
Integer !
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
port
func (m *myModule) example(ctx context.Context) int {
return dag.
OpensshServer().
Port(ctx)
}
@function
async def example() -> int:
return await (
dag.openssh_server()
.port()
)
@func()
async example(): Promise<number> {
return dag
.opensshServer()
.port()
}
withConfig() 🔗
Mount a custom SSH configuration file (with .conf extension).
Return Type
OpensshServer !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
file | File ! | - | No description provided |
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
with-config --name string --file file:path
func (m *myModule) example(name string, file *File) *OpensshServer {
return dag.
OpensshServer().
WithConfig(name, file)
}
@function
def example(name: str, file: dagger.File) -> dag.OpensshServer:
return (
dag.openssh_server()
.with_config(name, file)
)
@func()
example(name: string, file: File): OpensshServer {
return dag
.opensshServer()
.withConfig(name, file)
}
hostKeys() 🔗
Returns the SSH host keys.
Return Type
Directory !
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
host-keys
func (m *myModule) example() *Directory {
return dag.
OpensshServer().
HostKeys()
}
@function
def example() -> dagger.Directory:
return (
dag.openssh_server()
.host_keys()
)
@func()
example(): Directory {
return dag
.opensshServer()
.hostKeys()
}
knownHosts() 🔗
Return a formatted SSH known_hosts file.
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
host | String ! | - | No description provided |
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
known-hosts --host string
func (m *myModule) example(host string) *File {
return dag.
OpensshServer().
KnownHosts(host)
}
@function
def example(host: str) -> dagger.File:
return (
dag.openssh_server()
.known_hosts(host)
)
@func()
example(host: string): File {
return dag
.opensshServer()
.knownHosts(host)
}
withAuthorizedKey() 🔗
Authorize a public key. By default, the key is authorized for the root user.
Return Type
OpensshServer !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
publicKey | File ! | - | No description provided |
user | String | - | Authorize the key for this user. |
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
with-authorized-key --public-key file:path
func (m *myModule) example(publicKey *File) *OpensshServer {
return dag.
OpensshServer().
WithAuthorizedKey(publicKey)
}
@function
def example(public_key: dagger.File) -> dag.OpensshServer:
return (
dag.openssh_server()
.with_authorized_key(public_key)
)
@func()
example(publicKey: File): OpensshServer {
return dag
.opensshServer()
.withAuthorizedKey(publicKey)
}
withPort() 🔗
Set the port number for the OpenSSH server.
Return Type
OpensshServer !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
port | Integer ! | - | No description provided |
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
with-port --port integer
func (m *myModule) example(port int) *OpensshServer {
return dag.
OpensshServer().
WithPort(port)
}
@function
def example(port: int) -> dag.OpensshServer:
return (
dag.openssh_server()
.with_port(port)
)
@func()
example(port: number): OpensshServer {
return dag
.opensshServer()
.withPort(port)
}
service() 🔗
Return a service that runs the OpenSSH server.
Return Type
Service !
Example
dagger -m github.com/jedevc/daggerverse-sagikazarmark/openssh-server@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
service
func (m *myModule) example() *Service {
return dag.
OpensshServer().
Service()
}
@function
def example() -> dagger.Service:
return (
dag.openssh_server()
.service()
)
@func()
example(): Service {
return dag
.opensshServer()
.service()
}