Lesson 28 / 31
scp & Checking Connectivity
Copy files over SSH with scp and check connectivity with ping and curl.
scp — copy over SSH
scp copies files to or from a remote machine using the same auth as SSH.
scp report.pdf alice@myserver.com:/home/alice/
scp alice@myserver.com:/var/log/app.log ./app.logChecking connectivity
ping tests basic reachability. curl -I checks whether a web service responds.
ping -c 4 google.com
curl -I https://example.com
Output:
4 packets transmitted, 4 received, 0% packet loss HTTP/1.1 200 OK
Quick check: Which command copies a file to a remote server over SSH?
- scp
- ssh
- ping
- cat
Answer
scp — scp (secure copy) transfers files using the SSH protocol.