Dagger
Search

openssh-server

OpenSSH server module for testing SSH connections.

Installation

dagger install github.com/sagikazarmark/daggerverse/openssh-server@v0.1.0

Entrypoint

Return Type
OpensshServer !
Arguments
NameTypeDescription
containerContainer Custom container to use as a base container. OpenSSH server MUST be installed.
Example
dagger -m github.com/sagikazarmark/daggerverse/openssh-server@c767a220a5f507555fd415e9c9729234589fd95c 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 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/openssh-server@c767a220a5f507555fd415e9c9729234589fd95c call \
 container
func (m *myModule) example() *Container  {
	return dag.
			OpensshServer().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.openssh_server()
		.container()
	)
@func()
example(): Container {
	return dag
		.opensshServer()
		.container()
}

withConfig() 🔗

Mount a custom SSH configuration file (with .conf extension).

Return Type
OpensshServer !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
fileFile !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/openssh-server@c767a220a5f507555fd415e9c9729234589fd95c 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/sagikazarmark/daggerverse/openssh-server@c767a220a5f507555fd415e9c9729234589fd95c 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
NameTypeDefault ValueDescription
hostString !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/openssh-server@c767a220a5f507555fd415e9c9729234589fd95c 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
NameTypeDefault ValueDescription
publicKeyFile !-No description provided
userString -Authorize the key for this user.
Example
dagger -m github.com/sagikazarmark/daggerverse/openssh-server@c767a220a5f507555fd415e9c9729234589fd95c 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)
}

service() 🔗

Return a service that runs the OpenSSH server.

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
portInteger 22No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/openssh-server@c767a220a5f507555fd415e9c9729234589fd95c 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()
}