CTF Remote Access (SSH)
This skill provides a standard way to connect to your remote CTF environment (Kali Linux).
Configuration
Host: kong@myhost
Hostname: 192.168.6.128
IdentityFile: C:\Users\kongw\.ssh\id_ed25519
Options: -X (X11 Forwarding)
Usage
Connect to Shell
ssh -X -i C:\Users\kongw\.ssh\id_ed25519 -o IdentitiesOnly=yes kong@192.168.6.128
Run a Command
ssh -X -i C:\Users\kongw\.ssh\id_ed25519 -o IdentitiesOnly=yes kong@192.168.6.128 "ls -la"
Transfer Files (SCP)
# Upload
scp -i C:\Users\kongw\.ssh\id_ed25519 local_file kong@192.168.6.128:/home/kong/
# Download
scp -i C:\Users\kongw\.ssh\id_ed25519 kong@192.168.6.128:/home/kong/remote_file .
Remote Downloads (On Kali)
# Use wget on remote
ssh -i C:\Users\kongw\.ssh\id_ed25519 kong@192.168.6.128 "wget https://example.com/file -O /home/kong/file"
# Use curl on remote
ssh -i C:\Users\kongw\.ssh\id_ed25519 kong@192.168.6.128 "curl -L https://example.com/file -o /home/kong/file"
Quick Reference
- X11 Forwarding: Enabled via
-X. Use this to run GUI tools from Kali on your local machine. - Identity File: Ensure
C:\Users\kongw\.ssh\id_ed25519exists and has correct permissions. - Persistence: Use
tmuxorscreenon the remote host for persistent sessions.
Automated Connection Helper
You can use the provided SSH config snippet to simplify commands. See resources/ssh_config.