Networking

- Check connection to host
This commit is contained in:
bonnie 2020-07-18 23:42:09 +08:00
parent 8b0d9aa44a
commit 328bd53614

View File

@ -2292,6 +2292,16 @@ ping 8.8.8.8 -t 10
traceroute google.com
```
##### Check connection to host (e.g. check connection to port 80 and 22 of google.com)
```bash
nc -vw5 google.com 80
# Connection to google.com 80 port [tcp/http] succeeded!
nc -vw5 google.com 22
# nc: connect to google.com port 22 (tcp) timed out: Operation now in progress
# nc: connect to google.com port 22 (tcp) failed: Network is unreachable
```
##### Show the SSL certificate of a domain
```bash
openssl s_client -showcerts -connect www.example.com:443