54 lines
1.3 KiB
Markdown
54 lines
1.3 KiB
Markdown
|
|
### Решение проблем
|
|
|
|
> Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`
|
|
|
|
`> sudo apt remove golang-docker-credential-helpers`
|
|
|
|
> Git ignore rights
|
|
|
|
` > git config core.fileMode false`
|
|
|
|
|
|
### Ключи
|
|
|
|
#### Добавление ключика на удаленный сервер (root)
|
|
|
|
ssh-copy-id -i ~/.ssh/medlogic_awx_rsa.pub -p 22 root@remote
|
|
|
|
|
|
#### Добавление ключика на удаленный сервер (no root)
|
|
|
|
cat ~/.ssh/medlogic_awx_rsa.pub | ssh user@remote "sudo cat >> /root/.ssh/authorized_keys"
|
|
|
|
|
|
### Настройка сервера
|
|
> vim /etc/ssh/sshd_config
|
|
|
|
PermitRootLogin without-password
|
|
|
|
# Авторизация по паролю root
|
|
PermitRootLogin yes
|
|
|
|
PubkeyAuthentication yes
|
|
|
|
> service ssh restart
|
|
|
|
### Обратный ssh
|
|
на удаленном сервере
|
|
|
|
ssh -R 40022:localhost:22 proxy_user@188.225.79.4
|
|
|
|
на доступном сервере
|
|
|
|
ssh localhost -p 40022
|
|
|
|
|
|
### Crontab tasks
|
|
|
|
30 13 * * * /root/medicine-config/medicine-remd/update.sh
|
|
50 13 * * * /root/medicine-config/medicine-remd/backup_database.sh
|
|
|
|
20 13 * * * /root/medicine-config/medicine/update.sh
|
|
55 13 * * * /root/medicine-config/medicine/backup_database.sh
|