diff --git a/doc/cron.md b/doc/cron.md deleted file mode 100644 index dd30736..0000000 --- a/doc/cron.md +++ /dev/null @@ -1,8 +0,0 @@ -### Cron - -```crontab -e``` - -```0 0 1 1 * script.sh``` - Every year in 1 January 00:00:00 \ -```*/1 * * * * script.sh``` - Every minute\ -```0 */3 * * 2,5 script.sh``` - One time per 3 hours in Tue and Fri\ -```0 0,12 1 */2 * script.sh``` - At minute 0 past hour 0 and 12 on day-of-month 1 in every 2nd month diff --git a/doc/gpg.md b/doc/gpg.md deleted file mode 100644 index 42449f0..0000000 --- a/doc/gpg.md +++ /dev/null @@ -1,20 +0,0 @@ -## GPG - -### Encrypt -1. ```gpg --full-generate-key``` -2. ```gpg --export -a "thek4n" > public.key``` -a ASCII -3. ```gpg --fingerprint "thek4n"``` (send fingerprint IRL) -4. ```gpg -seaR "john" -u "thek4n" file``` -s sign, -e asymmetric, -a ASCII, -R ciphered receiver, -u secret key - -### Decrypt -1. ```gpg --import public.key``` -2. ```gpg --fingerprint "thek4n"``` (check fingerprint) -3. ```gpg -d --try-secret-key "john" file.asc > res.txt``` - -### Sign message (one file) -enc: ```gpg -u "thek4n" --clear-sign -s file``` -u secret key, --clear-sign ascii\ -dec: ```gpg -d file.asc``` - -### Sign binary (file and sign) -enc: ```gpg -u "thek4n" -b file``` -b detached sign\ -dec: ```gpg --verify file.sig file``` diff --git a/doc/ssh.md b/doc/ssh.md deleted file mode 100644 index d1e95b6..0000000 --- a/doc/ssh.md +++ /dev/null @@ -1,25 +0,0 @@ -`/etc/ssh/sshd_config` - - -* Access for VPS: - * ``` - PubkeyAuthentication yes - PasswordAuthentication no # only ssh-key - - Match User root - PasswordAuthentication yes - ``` - -* For local server: - * ``` - PermitRootLogin no # only sudo and su - PubkeyAuthentication yes - PasswordAuthentication no # only ssh-key - - Match Host 192.168.50.*,127.0.0.1 - PermitRootLogin yes # root only local - Match User root - PasswordAuthentication yes # root auth only password from local - ``` - -https://www.opennet.ru/base/sec/ssh_tips.txt.html