diff --git a/technology/applications/OpenSSL.md b/technology/applications/OpenSSL.md index 52d1054..5e00942 100644 --- a/technology/applications/OpenSSL.md +++ b/technology/applications/OpenSSL.md @@ -27,7 +27,14 @@ openssl [command] [options] #### Generate a certificate Usage: `openssl req -x509 -key private_key.pem -out certificate.pem -days 365` -#refactor -> infos on signed certificates with CAs +#### Generate a signed certificate +```shell +# Create Certificate Request +openssl req -new -key entity.key -out entity.csr + +# Sign with CA +openssl x509 -req -in entity.csr -CA ca.crt -CAkey ca.key -out entity.crt -CAcreateserial +``` #### Show information about a certificate Usage: `openssl x509 -in certificate.pem -text -noout` diff --git a/technology/applications/SSH.md b/technology/applications/SSH.md index efed1ac..08a08bc 100644 --- a/technology/applications/SSH.md +++ b/technology/applications/SSH.md @@ -53,6 +53,25 @@ Use a jump host: ssh -J jump_server remote ``` +Forward port to remote using [systemd](../linux/Systemd.md) service: +```ini +[Unit] +Description=SSH Port Forwarding +After=network.target +After=systemd-resolved.service + +[Service] +User= +ExecStart=/usr/bin/ssh -i -o ExitOnForwardFailure=yes -N -R 0.0.0.0::127.0.0.1: user@example.com +Restart=always +StartLimitInterval=0 +StartLimitBurst=0 +RestartSec=30s + +[Install] +WantedBy=multi-user.target +``` + ### Configuration Client can be configured by the file `~/.ssh/config` ``` diff --git a/technology/applications/cli/jq.md b/technology/applications/cli/jq.md index 71fb320..f736c5d 100644 --- a/technology/applications/cli/jq.md +++ b/technology/applications/cli/jq.md @@ -9,6 +9,9 @@ jq is a lightweight and flexible command-line [JSON](../../files/JSON.md) proces ## Usage ```shell cat data.json | jq [FILTER] + +# Raw Data +cat data.json | jq -r [FILTER] ``` ## Filters diff --git a/technology/applications/cli/skim.md b/technology/applications/cli/skim.md deleted file mode 100644 index e37dffc..0000000 --- a/technology/applications/cli/skim.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -obj: application -os: linux -repo: https://github.com/lotabout/skim ---- -# skim -[Repo](https://github.com/lotabout/skim) -Skim is a fuzzy finder. -#refactor - -## Usage -Flags: -```shell --m, --multi          Enable Multiple Selection -``` \ No newline at end of file diff --git a/technology/applications/development/xh.md b/technology/applications/development/xh.md deleted file mode 100644 index 36fbc13..0000000 --- a/technology/applications/development/xh.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -obj: application -os: - - linux -repo: https://github.com/ducaale/xh ---- -# xh -#refactor -[Repo](https://github.com/ducaale/xh) -xh is a friendly and fast tool for sending [HTTP](../../internet/HTTP.md) requests. It reimplements as much as possible of [HTTPie](HTTPie.md)'s excellent design, with a focus on improved performance. - -## Examples -``` -# Send a GET request -xh httpbin.org/json - -# Send a POST request with body {"name": "ahmed", "age": 24} -xh httpbin.org/post name=ahmed age:=24 - -# Send a GET request with querystring id=5&sort=true -xh get httpbin.org/json id==5 sort==true - -# Send a GET request and include a header named x-api-key with value 12345 -xh get httpbin.org/json x-api-key:12345 - -# Send a PUT request and pipe the result to less -xh put httpbin.org/put id:=49 age:=25 | less - -# Download and save to res.json -xh -d httpbin.org/json -o res.json - -# Make a request with a custom user agent -xh httpbin.org/get user-agent:foobar -``` \ No newline at end of file diff --git a/technology/programming/languages/Python.md b/technology/programming/languages/Python.md index cff27ff..3832a6e 100644 --- a/technology/programming/languages/Python.md +++ b/technology/programming/languages/Python.md @@ -1,5 +1,5 @@ --- -website: https://www.python.org/ +website: https://www.python.org obj: application ---