Linux Networking
Essential networking skills for DevOps and system administration.Network Configuration
SSH - Secure Shell
Firewall Basics
Next: Linux Shell Scripting →
Master Linux networking and SSH
# View IP addresses
ip addr
ifconfig # Older command
# View routing table
ip route
route -n
# Test connectivity
ping google.com
ping -c 4 8.8.8.8 # 4 packets
# DNS lookup
nslookup google.com
dig google.com
# Connect to remote server
ssh user@hostname
ssh [email protected]
# SSH with key
ssh -i ~/.ssh/mykey.pem user@server
# Copy files
scp file.txt user@server:/path/
scp -r directory/ user@server:/path/
# Generate SSH key
ssh-keygen -t ed25519 -C "[email protected]"
# Copy public key to server
ssh-copy-id user@server
# UFW (Ubuntu)
sudo ufw status
sudo ufw enable
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw deny 3306/tcp
# iptables
sudo iptables -L
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT