public void sign(Object privateKeyParameters) throws IOException {
		try {
			// NOTE: Signature is formatted consistent with legacy implementation
			// for backward compatibility
			if (privateKeyParameters instanceof RSAKeyParameters) {
				RSAKeyParameters cipherParams = (RSAKeyParameters) privateKeyParameters;
				RSADigestSigner signer = new RSADigestSigner(new SHA1Digest());
				signer.init(true, cipherParams);
				signer.update(token, 0, token.length);
				ByteArrayOutputStream out = new ByteArrayOutputStream();
				sshBuilderWriteString("ssh-rsa", out);
				sshBuilderWriteBlock(signer.generateSignature(), out);
				signature = out.toByteArray();
			}
			else if (privateKeyParameters instanceof DSAKeyParameters) {
				DSAKeyParameters cipherParams = (DSAKeyParameters) privateKeyParameters;
				DSADigestSigner signer = new DSADigestSigner(new DSASigner(), new SHA1Digest());
				signer.init(true, cipherParams);
				signer.update(token, 0, token.length);
				ByteArrayOutputStream out = new ByteArrayOutputStream();
				sshBuilderWriteString("ssh-dss", out);
				sshBuilderWriteBlock(signer.generateSignature(), out);
				signature = out.toByteArray();
			}
			else {
				throw new IllegalArgumentException("Unsupported SSH private key");
			}
		}
		catch (DataLengthException | CryptoException e) {
			throw new IOException("Cannot generate SSH signature: " + e.getMessage(), e);
		}
	}
Sign this challenge with the specified SSH private key.
@param privateKeyParameters SSH private key parameters 
       ({@link RSAKeyParameters} or {@link RSAKeyParameters})
@throws IOException if signature generation failed
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/SSHSignatureCallback.java