Linux & shell: Network basics & SSH
10 Linux & shell commands: Network basics & SSH. Click a command to see what each part does.
Linux & shell: Network basics & SSHIndex
- Whole sheet251
- Navigate & list13
- Create, copy, move, delete13
- View & compare files9
- Permissions & ownership31
- Help & shell basics11
- Users & groups6
- Install packages7
- Package & software versions29
- System info9
- Network basics & SSH10
- Zip & compress4
- Shell operators6
- Processes6
- Files & search8
- Text processing pipelines4
- Disk3
- Network5
- Services & logs6
- Archives & copying4
- Firewall7
- Scheduling: cron & systemd timers6
- Storage, mounts & LVM10
- Kernel, hardware & limits8
- Performance & tracing10
- TLS & certificates8
- Packet capture & network debugging10
- Terminal tools8
Network basics & SSH10
ping -c 4 <host>Is a host reachable?What each part does
pingsend ICMP echo requests-c 4stop after 4 packets (otherwise it runs until Ctrl+C)
ssh <user>@<host>Log in to a serverWhat each part does
sshsecure shell<user>@<host>remote user name and host name or IP
ssh -p <port> -i <key-file> <user>@<host>SSH with a port and a key fileWhat each part does
-p <port>remote port (default 22)-i <key-file>private key to use
ssh <user>@<host> "<command>"Run one command remotelyWhat each part does
"<command>"runs on the server, output comes back to you
ssh-keygen -t ed25519 -C "<email>"Create an SSH keyWhat each part does
ssh-keygengenerate a key pair-t ed25519key type (ed25519 is the modern default)-C "<email>"comment stored in the key, to recognise it
Tip Creates ~/.ssh/id_ed25519 (private, keep secret) and id_ed25519.pub (public).
ssh-copy-id <user>@<host>Install your public key on a serverWhat each part does
ssh-copy-idappend your public key to ~/.ssh/authorized_keys on the server
wget <url>Download a fileWhat each part does
wgetdownload to the current folder (curl -O <url> does the same)
nc -zv <host> <port>Is a TCP port open?What each part does
ncnetcat-zjust scan, send no data-vverbose: say "succeeded" or "refused"
traceroute <host>Path packets take to a hostWhat each part does
traceroutelist every hop (router) on the way; shows where it stops
ip aShow IP addressesWhat each part does
ip ashort for ip address: every interface with its IPs
Nothing matches.
My DevOps Playbook by Angelo John Calleja