Package ghidra.pty.ssh

# Class GhidraSshPtyFactory

java.lang.Object
ghidra.pty.ssh.GhidraSshPtyFactory

All Implemented Interfaces:
  `PtyFactory`

public class GhidraSshPtyFactory extends Object implements PtyFactory

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_CONFIG_FILE`
  `static final String`
  `DEFAULT_HOSTNAME`
  `static final int`
  `DEFAULT_PORT`
  `static final String`
  `DEFAULT_USERNAME`

  ### Fields inherited from interface ghidra.pty.PtyFactory

  `DEFAULT_COLS, DEFAULT_ROWS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GhidraSshPtyFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected com.jcraft.jsch.Session`
  `connectAndAuthenticate()`
  `String`
  `getConfigFile()`
  `String`
  `getDescription()`
  Get a human-readable description of the factory
  `String`
  `getHostname()`
  `int`
  `getPort()`
  `String`
  `getUsername()`
  `SshPty`
  `openpty(short cols, short rows)`
  Open a new pseudo-terminal
  `void`
  `setConfigFile(String configFile)`
  `void`
  `setHostname(String hostname)`
  `void`
  `setPort(int port)`
  `void`
  `setUsername(String username)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.pty.PtyFactory

  `openpty, openpty`

- ## Field Details

  - ### DEFAULT_HOSTNAME

    public static final String DEFAULT_HOSTNAME
    See Also:
      - Constant Field Values

  - ### DEFAULT_PORT

    public static final int DEFAULT_PORT
    See Also:
      - Constant Field Values

  - ### DEFAULT_USERNAME

    public static final String DEFAULT_USERNAME
    See Also:
      - Constant Field Values

  - ### DEFAULT_CONFIG_FILE

    public static final String DEFAULT_CONFIG_FILE
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### GhidraSshPtyFactory

    public GhidraSshPtyFactory()

- ## Method Details

  - ### getHostname

    public String getHostname()

  - ### setHostname

    public void setHostname(String hostname)

  - ### getPort

    public int getPort()

  - ### setPort

    public void setPort(int port)

  - ### getUsername

    public String getUsername()

  - ### setUsername

    public void setUsername(String username)

  - ### getConfigFile

    public String getConfigFile()

  - ### setConfigFile

    public void setConfigFile(String configFile)

  - ### connectAndAuthenticate

    protected com.jcraft.jsch.Session connectAndAuthenticate() throws IOException
    Throws:
      `IOException`

  - ### openpty

    public SshPty openpty(short cols, short rows) throws IOException
    Description copied from interface: `PtyFactory`
    Open a new pseudo-terminal
    Specified by:
      `openpty` in interface `PtyFactory`
    Parameters:
      `cols` - the initial width in characters, or 0 to let the system decide both dimensions
      `rows` - the initial height in characters, or 0 to let the system decide both dimensions
    Returns:
      new new Pty
    Throws:
      `IOException` - for an I/O error, including cancellation

  - ### getDescription

    public String getDescription()
    Description copied from interface: `PtyFactory`
    Get a human-readable description of the factory
    Specified by:
      `getDescription` in interface `PtyFactory`
    Returns:
      the description