clean up networking
This commit is contained in:
@@ -3,6 +3,7 @@ title: rclone
|
||||
tags:
|
||||
- networking
|
||||
- synch
|
||||
- backup
|
||||
---
|
||||
The manpage's 'Synopsis' provides a fast reference.
|
||||
```
|
||||
|
||||
@@ -3,6 +3,7 @@ title: Download Website
|
||||
tags:
|
||||
- networking
|
||||
- scraping
|
||||
- web
|
||||
---
|
||||
|
||||
```sh
|
||||
|
||||
@@ -2,29 +2,30 @@
|
||||
title: Download videos
|
||||
tags:
|
||||
- scraping
|
||||
- video
|
||||
---
|
||||
Install `yt-dlp`.
|
||||
|
||||
```sh
|
||||
yt-dlp --write-auto-sub *<URL>*
|
||||
yt-dlp --write-auto-sub ${url}
|
||||
```
|
||||
|
||||
It will default to English, but you can specify another language with the flag --sub-lang:
|
||||
|
||||
```sh
|
||||
youtube-dl --sub-lang sv --write-auto-sub *<URL>*
|
||||
youtube-dl --sub-lang sv --write-auto-sub ${url}
|
||||
```
|
||||
|
||||
You can list all available subtitles with:
|
||||
|
||||
```sh
|
||||
yt-dlp --list-subs *<URL>*
|
||||
yt-dlp --list-subs ${url}
|
||||
```
|
||||
|
||||
It's also possible to skip the video and only download the subtitle if you add the flag --skip-download:
|
||||
|
||||
```sh
|
||||
yt-dlp --sub-lang sv --write-auto-sub --skip-download *<URL>*
|
||||
yt-dlp --sub-lang sv --write-auto-sub --skip-download ${url}
|
||||
```
|
||||
|
||||
## Alternative
|
||||
|
||||
@@ -33,6 +33,7 @@ Then start that service:
|
||||
```sh
|
||||
sudo systemctl start sshd
|
||||
```
|
||||
|
||||
Test it works by using ssh into your own system, from inside:
|
||||
|
||||
|
||||
@@ -77,6 +78,7 @@ Look at your keys:
|
||||
|
||||
```sh
|
||||
ls ~/.ssh
|
||||
ls -l ~/.ssh
|
||||
```
|
||||
|
||||
You can share the one ending in `.pub` freely.
|
||||
@@ -86,6 +88,7 @@ Now send those keys to a remote computer:
|
||||
|
||||
```sh
|
||||
ssh-copy-id ${username}@{ip_address}
|
||||
ssh ${username}@{ip_address}
|
||||
```
|
||||
|
||||
Now you can log in without a password.
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
---
|
||||
title: network
|
||||
tags:
|
||||
- networking
|
||||
---
|
||||
|
||||
# Netstat Stuff
|
||||
|
||||
Stats on local net usage within domain.
|
||||
|
||||
```sh
|
||||
iftop -p -n
|
||||
```
|
||||
|
||||
```sh
|
||||
whois domain.com
|
||||
```
|
||||
|
||||
Info on domain, whether it's taken, et c.:
|
||||
|
||||
```sh
|
||||
dig domain.com
|
||||
```
|
||||
|
||||
```sh
|
||||
ifconfig
|
||||
```
|
||||
|
||||
Versatile wifi tool:
|
||||
|
||||
```sh
|
||||
nmcli
|
||||
```
|
||||
|
||||
# Examples
|
||||
|
||||
You want to connect to the internet.
|
||||
|
||||
```sh
|
||||
sudo iwconfig
|
||||
```
|
||||
|
||||
Get knowledge of wireless state. The output might be:
|
||||
|
||||
> wlp3s0 IEEE 802.11 ESSID:"Gandalf WajFaj"
|
||||
|
||||
> Mode:Managed Frequency:2.412 GHz Access Point: 10:05:01:90:AC:1A
|
||||
|
||||
> Bit Rate=144.4 Mb/s Tx-Power=15 dBm
|
||||
|
||||
> Retry short limit:7 RTS thr:off Fragment thr:off
|
||||
|
||||
> Encryption key:off
|
||||
|
||||
> Power Management:on
|
||||
|
||||
> Link Quality=64/70 Signal level=-46 dBm
|
||||
|
||||
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag
|
||||
|
||||
> Tx excessive retries:0 Invalid misc:363 Missed beacon
|
||||
|
||||
This tells you that your ESSID is 'Gandalf WajFaj', and the access point name is 10:05:......
|
||||
|
||||
```sh
|
||||
nmcli radio
|
||||
```
|
||||
|
||||
You get an overview of your radio devices.
|
||||
You're told that eth0 deals with your ethernet and `wlan0` deals with wifi.
|
||||
`wlan0` is a file which represents your wifi device.
|
||||
|
||||
```sh
|
||||
nmcli wlan0 wifi rescan
|
||||
```
|
||||
|
||||
```sh
|
||||
nmcli device wifi list
|
||||
```
|
||||
|
||||
Now to connect.
|
||||
|
||||
```sh
|
||||
nmcli device wifi connect [SSID] [your password] [wifi password]
|
||||
```
|
||||
|
||||
Alternatively, you can use
|
||||
|
||||
```sh
|
||||
nmcli -ask device wifi connect [SSID]
|
||||
```
|
||||
|
||||
And it'll ask for your password, so you're not typing it in in full view.
|
||||
|
||||
@@ -4,10 +4,6 @@ tags:
|
||||
- networking
|
||||
- VPN
|
||||
---
|
||||
<!--
|
||||
from
|
||||
https://engineerworkshop.com/blog/how-to-set-up-wireguard-on-a-raspberry-pi/
|
||||
-->
|
||||
|
||||
## On Server
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
---
|
||||
title: wireless
|
||||
tags:
|
||||
- networking
|
||||
---
|
||||
|
||||
Check wifi's working
|
||||
|
||||
```sh
|
||||
lspci -k
|
||||
```
|
||||
|
||||
Or for usb wifi:
|
||||
|
||||
```sh
|
||||
dmesg | grep usbcore
|
||||
```
|
||||
|
||||
...and hopefully it'll say the new interface is registered.
|
||||
|
||||
Check if a wifi interface has been created
|
||||
|
||||
```sh
|
||||
ip link
|
||||
```
|
||||
|
||||
...or
|
||||
|
||||
```sh
|
||||
iw dev
|
||||
```
|
||||
|
||||
Assuming it's wlan0, bring it up with
|
||||
|
||||
```sh
|
||||
ip link set wlan0 up
|
||||
```
|
||||
|
||||
Error messages probably means your wireless chipset requires a firmware to function. In this case, check the kernel messages for firmware being loaded
|
||||
|
||||
```sh
|
||||
dmesg | grep firmware
|
||||
```
|
||||
|
||||
# Utilities
|
||||
|
||||
- `iw` doesn't do wpa/wpa2.
|
||||
- `iwd` does everything except WEXT encryption.
|
||||
- `wpa_supplicant` does everything.
|
||||
|
||||
# Connecting
|
||||
|
||||
Get the link status:
|
||||
|
||||
```sh
|
||||
iw dev wlan0 link
|
||||
```
|
||||
|
||||
Scan for available points:
|
||||
|
||||
```sh
|
||||
iw dev wlan0 scan
|
||||
```
|
||||
|
||||
The connecting commands do not cover wpa2.
|
||||
|
||||
Reference in New Issue
Block a user