bartender.shared.ssh#

Classes#

SshConnectConfig

Configuration for ssh connection.

Functions#

ssh_connect(→ asyncssh.SSHClientConnection)

Connect to a host using SSH.

Module Contents#

class bartender.shared.ssh.SshConnectConfig#

Bases: pydantic.BaseModel

Configuration for ssh connection.

usename#

Username to connect with. When absent will use username of logged in user.

hostname: str#
port: asyncssh.misc.DefTuple[int] = ()#
username: asyncssh.misc.DefTuple[str] = ()#
password: asyncssh.misc.DefTuple[str] = ()#
async bartender.shared.ssh.ssh_connect(config: SshConnectConfig) asyncssh.SSHClientConnection#

Connect to a host using SSH.

Parameters:

config (SshConnectConfig) – Configuration.

Returns:

The connection.

Return type:

asyncssh.SSHClientConnection