Package ghidra.framework.remote

# Class SSHSignatureCallback

java.lang.Object
ghidra.framework.remote.SSHSignatureCallback

All Implemented Interfaces:
  `Serializable`, `Callback`

public class SSHSignatureCallback extends Object implements Callback, Serializable
`SSHSignatureCallback` provides a Callback implementation used to perform SSH authentication. This callback is instantiated by the server with a random token which must be signed using the user's SSH private key.

It is the responsibility of the callback handler to invoke the sign method and return this object in response to the callback.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final long`
  `serialVersionUID`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SSHSignatureCallback(byte[] token, byte[] serverSignature)`
  Construct callback with a random token to be signed by the client.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getServerSignature()`
  Get the server signature of token (using server PKI)
  `byte[]`
  `getSignature()`
  `byte[]`
  `getToken()`
  `boolean`
  `isSigned()`
  `void`
  `sign(Object privateKeyParameters)`
  Sign this challenge with the specified SSH private key.

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

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

- ## Field Details

  - ### serialVersionUID

    public static final long serialVersionUID
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SSHSignatureCallback

    public SSHSignatureCallback(byte[] token, byte[] serverSignature)
    Construct callback with a random token to be signed by the client.
    Parameters:
      `token` - random bytes to be signed
      `serverSignature` - server signature of token (using server PKI)

- ## Method Details

  - ### getToken

    public byte[] getToken()
    Returns:
      token to be signed using user certificate.

  - ### getSignature

    public byte[] getSignature()
    Returns:
      signed token bytes set by callback handler.

  - ### getServerSignature

    public byte[] getServerSignature()
    Get the server signature of token (using server PKI)
    Returns:
      the server's signature of the token bytes.

  - ### isSigned

    public boolean isSigned()
    Returns:
      true if callback has been signed

  - ### sign

    public void sign(Object privateKeyParameters) throws IOException
    Sign this challenge with the specified SSH private key.
    Parameters:
      `privateKeyParameters` - SSH private key parameters (`RSAKeyParameters` or `RSAKeyParameters`)
    Throws:
      `IOException` - if signature generation failed