termux-connecting 1.1.43 → 1.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -167,7 +167,7 @@ cmd_connection() {
167
167
  local connected=false
168
168
 
169
169
  # Key-based
170
- if run_timeout 10 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 -o BatchMode=yes -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}" "echo connected"; then
170
+ if run_timeout 15 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o ServerAliveInterval=15 -o BatchMode=yes -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}" "echo connected"; then
171
171
  info "Koneksi berhasil (key-based)"
172
172
  connected=true
173
173
  # Password via sshpass
@@ -175,7 +175,7 @@ cmd_connection() {
175
175
  echo " SSH key tidak dikenali. Coba dengan password..."
176
176
  local pass
177
177
  pass=$(prompt " ➤ Password SSH" "")
178
- if run_timeout 10 sshpass -p "$pass" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}" "echo connected"; then
178
+ if run_timeout 15 sshpass -p "$pass" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ServerAliveInterval=15 -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}" "echo connected"; then
179
179
  info "Koneksi berhasil (password)"
180
180
  connected=true
181
181
  fi
@@ -187,7 +187,7 @@ cmd_connection() {
187
187
  echo " ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST}"
188
188
  echo ""
189
189
  echo -n " ➤ Setelah berhasil, tekan enter untuk lanjut..."; read -r
190
- if run_timeout 10 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 -o BatchMode=yes -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}" "echo connected"; then
190
+ if run_timeout 15 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o ServerAliveInterval=15 -o BatchMode=yes -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}" "echo connected"; then
191
191
  connected=true
192
192
  fi
193
193
  fi
@@ -228,11 +228,11 @@ cmd_connection() {
228
228
  echo " Meng-copy public key ke HP..."
229
229
  local copy_ok=false
230
230
  if command -v sshpass >/dev/null && [ -n "$pass" ]; then
231
- if run_timeout 15 sshpass -p "$pass" ssh-copy-id -i "$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}"; then
231
+ if run_timeout 15 sshpass -p "$pass" ssh-copy-id -i "$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o ServerAliveInterval=15 -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}"; then
232
232
  copy_ok=true
233
233
  fi
234
234
  else
235
- if run_timeout 15 ssh-copy-id -i "$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}"; then
235
+ if run_timeout 15 ssh-copy-id -i "$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o ServerAliveInterval=15 -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}"; then
236
236
  copy_ok=true
237
237
  fi
238
238
  fi
@@ -369,11 +369,11 @@ cmd_check() {
369
369
  echo "Device: ${ACTIVE_DEVICE} (${SSH_USER}@${SSH_HOST}:${SSH_PORT})"
370
370
  echo ""
371
371
 
372
- if run_timeout 10 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 -o BatchMode=yes "$ACTIVE_DEVICE" "echo connected" 2>/dev/null; then
372
+ if run_timeout 15 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o ServerAliveInterval=15 -o BatchMode=yes "$ACTIVE_DEVICE" "echo connected" 2>/dev/null; then
373
373
  info "Koneksi OK"
374
374
  echo ""
375
375
  info "Gunakan ssh $ACTIVE_DEVICE untuk koneksi"
376
- elif run_timeout 10 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 -o PasswordAuthentication=no "$ACTIVE_DEVICE" "echo connected" 2>/dev/null; then
376
+ elif run_timeout 15 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o ServerAliveInterval=15 -o PasswordAuthentication=no "$ACTIVE_DEVICE" "echo connected" 2>/dev/null; then
377
377
  info "Koneksi OK (key-based)"
378
378
  echo ""
379
379
  warn "Key $SSH_KEY memiliki passphrase. Agar tidak ditanya tiap kali:"
@@ -1,7 +1,7 @@
1
1
  #!/data/data/com.termux/files/usr/bin/bash
2
2
  set -e
3
3
 
4
- VERSION="1.1.41"
4
+ VERSION="1.1.45"
5
5
 
6
6
  GREEN='\033[0;32m'; YELLOW='\033[1;33m'; RED='\033[0;31m'; CYAN='\033[0;36m'; NC='\033[0m'
7
7
  info() { echo -e "${GREEN}[✓]${NC} $1"; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-connecting",
3
- "version": "1.1.43",
3
+ "version": "1.1.45",
4
4
  "description": "CLI setup Termux + koneksi SSH dari PC/Mac dengan Telegram alert",
5
5
  "bin": {
6
6
  "termux-connecting": "bin/termux-connecting",