Skip to the content.

← Back

πŸ” 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