Skip to main content

SSH

Feature to connect, transfer files and execute commands via SSH.


close


_ssh.close() : void

Description

Closes all open sessions and performs SSH disconnection from the server.

Return

( void )

Current SSH object.


config


_ssh.config() : SSHConfig

Description

Starts a new configuration of its own.

Return

( SSHConfig )

Configuration object loaded from received data.


_ssh.config(config: Values) : SSHConfig

Description

Starts a new configuration of its own.

Attributes
NAMETYPEDESCRIPTION
configValuesConfiguration definition data structure.
Return

( SSHConfig )

Configuration object loaded from received data.


_ssh.config(config: SSHConfig) : SSH

Description

Define outra configuração que deve ser utilizada.

Attributes
NAMETYPEDESCRIPTION
configSSHConfigDefinition of the new configuration.
Return

( SSH )

Current SSH resource.


connect


_ssh.connect() : SSH

Description

Starts connecting to the server via SSH.

Return

( SSH )

Current SSH resource.


disconnect


_ssh.disconnect() : SSH

Description

Closes all open sessions and performs SSH disconnection from the server.

Return

( SSH )

Current SSH resource.


enabled


_ssh.enabled() : boolean

Return

( boolean )


_ssh.enabled(enabled: boolean) : SSH

Description

Sets whether it is enabled.

Attributes
NAMETYPEDESCRIPTION
enabledbooleanWhether it is active or inactive.
Return

( SSH )

Current SSH resource.


getClient


_ssh.getClient() : org.netuno.psamata.ssh.SSHClient

Description

Gets the base SSH client.

Return

( org.netuno.psamata.ssh.SSHClient )

Original base SSH client


getConfig


_ssh.getConfig() : SSHConfig

Description

Gets the configuration that is being used.

Return

( SSHConfig )

Object of the active configuration.


init


_ssh.init() : SSH

Description

Starts a new instance of SSH using the SSH configuration of the default key.

Return

( SSH )

The new instance of the SSH resource based on the default SSH configuration.


_ssh.init(configKey: string) : SSH

Description

Starts a new instance of SSH from a specific configuration.

Attributes
NAMETYPEDESCRIPTION
configKeystringKey of the SSH configuration that will be used.
Return

( SSH )

The new instance of the SSH resource based on the specified SSH configuration.


_ssh.init(config: SSHConfig) : SSH

Description

Starts a new instance of SSH from a configuration that is defined in its own configuration object.

Attributes
NAMETYPEDESCRIPTION
configSSHConfigConfiguration that will be used.
Return

( SSH )

The new instance of the SSH resource based on the defined configuration.


initSCP


_ssh.initSCP() : SSHSCP

Description

Starts SCP session to manage folders and transfer files.

Return

( SSHSCP )

The SCP session started to execute commands.


initSFTP


_ssh.initSFTP() : SSHSFTP

Description

Starts SFTP session to manage folders and transfer files.

Return

( SSHSFTP )

The SFTP session started to execute commands.


initSession


_ssh.initSession() : SSHSession

Description

Starts SSH session to execute commands.

Return

( SSHSession )

The session started to execute commands.


isEnabled


_ssh.isEnabled() : boolean

Description

Checks if it is enabled.

Return

( boolean )

Result whether or not it is activated.


setConfig


_ssh.setConfig(config: SSHConfig) : SSH

Description

Define outra configuração que deve ser utilizada.

Attributes
NAMETYPEDESCRIPTION
configSSHConfigDefinition of the new configuration.
Return

( SSH )

Current SSH resource.


setEnabled


_ssh.setEnabled(enabled: boolean) : SSH

Description

Sets whether it is enabled.

Attributes
NAMETYPEDESCRIPTION
enabledbooleanWhether it is active or inactive.
Return

( SSH )

Current SSH resource.