π SSH-NC Handbook: A Simple Guide to Remote Access & File Transfer
Whether youβre experimenting with Kali Linux, Termux, or just want to learn how to control devices on your local network, SSH and Netcat (NC) are powerful, lightweight tools for remote login, terminal chat, and file sharing.
βοΈ What is SSH?
SSH (Secure Shell) allows you to remotely access another deviceβs terminal securely.
π Basic SSH Commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Connect to a remote device
ssh username@ip_address
# Add -v for verbose output (debug info)
ssh -v username@ip_address
# -n prevents reading from stdin (useful for scripting)
ssh -nv username@ip_address
# Copy files from local to remote
scp file.txt username@ip_address:/path/
# Copy files from remote to local
scp username@ip_address:/path/file.txt .
π How to Transfer Files Using SSH
From Local to Remote
1
scp example.txt user@192.168.1.10:/home/user/
From Remote to Local
1
scp user@192.168.1.10:/home/user/example.txt .
π What is Netcat (NC)?
Netcat is a lightweight networking tool used to send/receive data over TCP or UDP.
π Terminal Chat Over Local Network
On Device A (Receiver):
1
nc -lvp 1234
On Device B (Sender):
1
nc 192.168.1.10 1234
π Send a File
On Receiver:
1
nc -lvp 5555 > received.txt
On Sender:
1
nc 192.168.1.10 5555 < file.txt
π Send a Directory with Netcat (Compressed)
Sender (Compress first):
1
2
tar czf folder.tar.gz folder/
nc 192.168.1.10 4444 < folder.tar.gz
Receiver:
1
2
nc -lvp 4444 > folder.tar.gz
tar xzf folder.tar.gz
π§ When to Use SSH vs Netcat
Task | Use SSH | Use Netcat |
---|---|---|
Remote terminal login | β | β |
File transfers (secure) | β | β οΈ (no encryption) |
Chat/Terminal Pipe | β | β |
Quick LAN testing | β | β |
π Install Netcat on Termux
1
pkg update && pkg install netcat
Or for some versions:
1
2
pkg install busybox
busybox nc
π Wrap Up
SSH and Netcat are core tools every Linux user should master. With just a few commands, you can securely connect to devices, transfer files, or even set up chat over LAN.
If youβre learning cybersecurity, DevOps, or networking β this handbook is for you.
π Back to Home