Обновить Настройка Reverse SSH
parent
bb9ee973fa
commit
8fd029ee47
|
|
@ -130,5 +130,10 @@ LISTEN 127.0.0.1:18010
|
|||
journalctl -u iomatex-remote -n 100 --no-pager
|
||||
```
|
||||
|
||||
## Удалить и почистить все про Reverse tounel с устройства
|
||||
|
||||
```
|
||||
sudo bash -c 'hn="$(hostname)"; svc="iomatex-remote"; edge_user="iomatex"; home_dir="$(getent passwd "$edge_user" | cut -d: -f6)"; systemctl disable --now "$svc" 2>/dev/null || true; rm -f "/etc/systemd/system/${svc}.service"; systemctl daemon-reload; rm -f "/var/log/iomatex-stage4-reverse-tunnel.log" "/var/log/iomatex-autossh-${hn}.log" "/var/log/iomatex-remote-${hn}.log"; rm -f "${home_dir}/.ssh/iomatex-${hn}" "${home_dir}/.ssh/iomatex-${hn}.pub"; echo "----- VERIFY -----"; systemctl status "$svc" 2>&1 | grep -q "could not be found" && echo "Service: OK removed" || echo "Service: STILL EXISTS"; ls /etc/systemd/system | grep -q "$svc" && echo "Unit file: STILL EXISTS" || echo "Unit file: OK removed"; ls "${home_dir}/.ssh" 2>/dev/null | grep -q "iomatex-${hn}" && echo "SSH key: STILL EXISTS" || echo "SSH key: OK removed"; ls /var/log | grep -q "iomatex-.*${hn}" && echo "Logs: STILL EXISTS" || echo "Logs: OK removed"'
|
||||
```
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue