Merge remote-tracking branch 'origin/main'

This commit is contained in:
TheK4n 2022-04-17 01:28:46 +03:00
commit d56457f68d
4 changed files with 0 additions and 63 deletions

View File

@ -14,7 +14,6 @@
* [Project description](#chapter-0)
* [Installation](#chapter-1)
* [Docs](#chapter-2)
<a id="chapter-0"></a>
@ -35,15 +34,6 @@ cd dotfiles
make
```
<a id="chapter-2"></a>
## Docs
* [Tips](doc/tips.md)
* [Cron](doc/cron.md)
* [GPG](doc/gpg.md)
* [SSH](doc/ssh.md)
* [Tar](doc/tar.md)
* [Vim](doc/vim.md)

View File

@ -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

View File

@ -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```

View File

@ -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