Utility Methods for Zowe

export

### Hierarchy

- SshSession

## Index

### Constructors

- constructor

### Properties

- mISshSession
- DEFAULT_SSH_PORT
- SSH_CONNECTION_OPTIONS
- SSH_CONNECTION_OPTION_GROUP

### Accessors

- ISshSession
- log

### Methods

- buildSession
- createSshSessCfgFromArgs

### Object literals

- SSH_OPTION_HANDSHAKETIMEOUT
- SSH_OPTION_HOST
- SSH_OPTION_KEYPASSPHRASE
- SSH_OPTION_PASSWORD
- SSH_OPTION_PORT
- SSH_OPTION_PRIVATEKEY
- SSH_OPTION_USER

## Constructors

### constructor

- new SshSession(mISshSession: ISshSession): SshSession

- - Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:150

  Creates an instance of AbstractSession.

  #### Parameters

  - ##### mISshSession: ISshSession

  #### Returns SshSession

## Properties

### Private mISshSession

mISshSession: ISshSession

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:156

### Static Readonly DEFAULT_SSH_PORT

DEFAULT_SSH_PORT: 22 = 22

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:31

Default ssh port 22

static
memberof

  AbstractSession

### Static SSH_CONNECTION_OPTIONS

SSH_CONNECTION_OPTIONS: ICommandOptionDefinition[] = [SshSession.SSH_OPTION_HOST,SshSession.SSH_OPTION_PORT,SshSession.SSH_OPTION_USER,SshSession.SSH_OPTION_PASSWORD,SshSession.SSH_OPTION_PRIVATEKEY,SshSession.SSH_OPTION_KEYPASSPHRASE,SshSession.SSH_OPTION_HANDSHAKETIMEOUT]

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:129

Options related to connecting to z/OS SSH These options can be filled in if the user creates a profile

### Static SSH_CONNECTION_OPTION_GROUP

SSH_CONNECTION_OPTION_GROUP: string = "z/OS Ssh Connection Options"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:43

## Accessors

### ISshSession

- get ISshSession(): ISshSession

- - Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:39

  Obtain session info and defaults

  readonly
  memberof

    AbstractSession

  #### Returns ISshSession

### Static Private log

- get log(): Logger

- - Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:160

  #### Returns Logger

## Methods

### Private buildSession

- buildSession(session: ISshSession): ISshSession

- - Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:170

  Builds an ISshSession so all required pieces are filled in

  memberof

    AbstractSession

  #### Parameters

  - ##### session: ISshSession

    the fully populated session

  #### Returns ISshSession

### Static createSshSessCfgFromArgs

- createSshSessCfgFromArgs(args: ICommandArguments): ISshSession

- - Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:144

  Given command line arguments, create an SSH session configuration object.

  #### Parameters

  - ##### args: ICommandArguments

    The arguments specified by the user

  #### Returns ISshSession

  - A session configuration to be used for an SSH session.

## Object literals

### Static SSH_OPTION_HANDSHAKETIMEOUT

SSH_OPTION_HANDSHAKETIMEOUT: object

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:117

Option used in profile creation to set handshake timeout. If unset, defaults to no timeout.

### aliases

aliases: string[] = ["timeout", "to"]

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:119

### description

description: string = "How long in milliseconds to wait for the SSH handshake to complete."

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:120

### group

group: string = SshSession.SSH_CONNECTION_OPTION_GROUP

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:122

### name

name: string = "handshakeTimeout"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:118

### type

type: string = "number"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:121

### Static SSH_OPTION_HOST

SSH_OPTION_HOST: object

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:48

Option used in profile creation and commands for hostname for z/OS SSH

### aliases

aliases: string[] = ["H"]

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:50

### description

description: string = "The z/OS SSH server host name."

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:51

### group

group: string = SshSession.SSH_CONNECTION_OPTION_GROUP

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:54

### name

name: string = "host"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:49

### required

required: boolean = false

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:53

### type

type: string = "string"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:52

### Static SSH_OPTION_KEYPASSPHRASE

SSH_OPTION_KEYPASSPHRASE: object

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:106

Option used in profile creation and commands for passphrase for private key

### aliases

aliases: string[] = ["passphrase", "kp"]

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:108

### description

description: string = "Private key passphrase, which unlocks the private key."

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:109

### group

group: string = SshSession.SSH_CONNECTION_OPTION_GROUP

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:111

### name

name: string = "keyPassphrase"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:107

### type

type: string = "string"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:110

### Static SSH_OPTION_PASSWORD

SSH_OPTION_PASSWORD: object

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:84

Option used in profile creation and commands for password/passphrase for z/OS SSH

### aliases

aliases: string[] = ["pass", "pw"]

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:86

### description

description: string = "Mainframe password, which can be the same as your TSO password."

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:87

### group

group: string = SshSession.SSH_CONNECTION_OPTION_GROUP

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:89

### name

name: string = "password"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:85

### type

type: string = "string"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:88

### Static SSH_OPTION_PORT

SSH_OPTION_PORT: object

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:60

Option used in profile creation and commands for port for z/OS SSH

### aliases

aliases: string[] = ["P"]

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:62

### defaultValue

defaultValue: number = 22

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:65

### description

description: string = "The z/OS SSH server port."

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:63

### group

group: string = SshSession.SSH_CONNECTION_OPTION_GROUP

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:66

### name

name: string = "port"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:61

### type

type: string = "number"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:64

### Static SSH_OPTION_PRIVATEKEY

SSH_OPTION_PRIVATEKEY: object

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:95

Option used in profile creation and commands for private key path

### aliases

aliases: string[] = ["key", "pk"]

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:97

### description

description: string = "Path to a file containing your private key, that must match a public key stored in the server for authentication"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:98

### group

group: string = SshSession.SSH_CONNECTION_OPTION_GROUP

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:100

### name

name: string = "privateKey"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:96

### type

type: string = "string"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:99

### Static SSH_OPTION_USER

SSH_OPTION_USER: object

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:72

Option used in profile creation and commands for username / ID for z/OS SSH

### aliases

aliases: string[] = ["u"]

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:74

### description

description: string = "Mainframe user name, which can be the same as your TSO login."

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:75

### group

group: string = SshSession.SSH_CONNECTION_OPTION_GROUP

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:78

### name

name: string = "user"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:73

### required

required: boolean = false

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:77

### type

type: string = "string"

- Defined in @zowe/zos-uss-for-zowe-sdk/src/SshSession.ts:76

Generated using TypeDoc