diff --git a/app/src/main/java/com/kosbarokah/sshclient/ssh/SshEngine.kt b/app/src/main/java/com/kosbarokah/sshclient/ssh/SshEngine.kt index 955fc24..4d1eb84 100644 --- a/app/src/main/java/com/kosbarokah/sshclient/ssh/SshEngine.kt +++ b/app/src/main/java/com/kosbarokah/sshclient/ssh/SshEngine.kt @@ -1,5 +1,6 @@ package com.kosbarokah.sshclient.ssh +import android.util.Log import com.kosbarokah.sshclient.data.AuthMethod import com.kosbarokah.sshclient.data.ServerProfile import kotlinx.coroutines.CoroutineScope @@ -37,6 +38,10 @@ class SshEngine( private val passwordPolicy: PasswordPolicy = PasswordPolicy.DENY_INTERACTIVE_PROMPT ) { + companion object { + private const val TAG = "SSHClient/SshEngine" + } + enum class PasswordPolicy { /** Do not auto-answer interactive password/kbf prompts. */ DENY_INTERACTIVE_PROMPT, @@ -83,6 +88,7 @@ class SshEngine( // connected — this loop continues only on disconnection } catch (e: Exception) { val msg = e.message ?: "koneksi gagal" + Log.e(TAG, "SSH koneksi gagal (percobaan ${attempt}): $msg", e) if (!running) break val willRetry = attempt < maxReconnectAttempts if (willRetry) {