SSHConfig

The scherbelberg.SSHConfig class is a very simple, immutable class for describing ssh connection settings.

The SSHConfig Class

class scherbelberg.SSHConfig(name, user, fn_private, port=22, compression=True, cipher='aes256-gcm@openssh.com')

Holds configuration for an SSH connection. Immutable.

Parameters
  • name (str) – Domain name or IP of remote system.

  • user (str) – Remote user name.

  • fn_private (str) – Location of private SSH key.

  • port (int) – SSH port on remote system.

  • compression (bool) – Turns SSH compression on or off.

  • cipher (str) – Specifies cipher for SSH connection.

__repr__()

Interactive string representation

Return type

str

property cipher: str

Specifies cipher for SSH connection

Return type

str

property compression: bool

Turns SSH compression on or off

Return type

bool

property fn_private: str

Location of private SSH key

Return type

str

property name: str

Domain name or IP of remote system

Return type

str

new(name, user, fn_private, port, compression, cipher)

Generate a new SSH configuration from present object by changing individual parameters.

Parameters
  • name (Optional[str]) – Domain name or IP of remote system.

  • user (Optional[str]) – Remote user name.

  • fn_private (Optional[str]) – Location of private SSH key.

  • port (Optional[int]) – SSH port on remote system.

  • compression (Optional[bool]) – Turns SSH compression on or off.

  • cipher (Optional[str]) – Specifies cipher for SSH connection.

Return type

SSHConfigABC

Returns

New SSH configuration object.

property port: int

SSH port on remote system

Return type

int

property user: str

Remote user name

Return type

str