chore: ignore verify server key (#398)

This commit is contained in:
hstyi
2025-03-27 11:52:36 +08:00
committed by GitHub
parent d8ec7b6d4a
commit 9b84fb4ec8
4 changed files with 1 additions and 27 deletions

View File

@@ -336,30 +336,7 @@ private class MyDialogServerKeyVerifier(private val owner: Window) : ServerKeyVe
remoteAddress: SocketAddress,
serverKey: PublicKey
): Boolean {
if (SshClients.isMiddleware(clientSession)) {
return true
}
val result = AtomicBoolean(false)
SwingUtilities.invokeAndWait {
result.set(
OptionPane.showConfirmDialog(
parentComponent = owner,
message = I18n.getString(
"termora.host.verify-server-key",
remoteAddress.toString().replace("/", StringUtils.EMPTY),
KeyUtils.getKeyType(serverKey),
KeyUtils.getFingerPrint(serverKey)
),
optionType = JOptionPane.OK_CANCEL_OPTION,
messageType = JOptionPane.WARNING_MESSAGE,
) == JOptionPane.OK_OPTION
)
}
return result.get()
return true
}
override fun acceptModifiedServerKey(