README.md aktualisiert
This commit is contained in:
parent
d22efb3131
commit
292a253833
1 changed files with 26 additions and 1 deletions
27
README.md
27
README.md
|
@ -4,29 +4,51 @@ Nützliche shell-scripte
|
||||||
ssh tunnel vom server oder zum server
|
ssh tunnel vom server oder zum server
|
||||||
einrichten mit:
|
einrichten mit:
|
||||||
|
|
||||||
|
~~~
|
||||||
ssh-keygen -t rsa -b 4096
|
ssh-keygen -t rsa -b 4096
|
||||||
|
|
||||||
ssh-copy-id -i ~/.ssh/id_rsa.pub user@server
|
ssh-copy-id -i ~/.ssh/id_rsa.pub user@server
|
||||||
|
~~~
|
||||||
|
|
||||||
oder
|
oder
|
||||||
|
|
||||||
|
~~~
|
||||||
cat id_rsa.pub | ssh server 'cat>> ~/.ssh/authorized_keys'
|
cat id_rsa.pub | ssh server 'cat>> ~/.ssh/authorized_keys'
|
||||||
|
~~~
|
||||||
|
|
||||||
### Zum schreiben eines Passworts mittels eines virtuellen Keyboards
|
### Zum schreiben eines Passworts mittels eines virtuellen Keyboards
|
||||||
|
|
||||||
|
https://man.archlinux.org/man/ydotool.1
|
||||||
|
|
||||||
### ydotool
|
### ydotool
|
||||||
sleep 5 && sudo ydotool type 'Hello world!' && notify-send finish
|
|
||||||
|
run deamon with:
|
||||||
|
|
||||||
|
~~~
|
||||||
|
sudo ydotoold
|
||||||
|
~~~
|
||||||
|
|
||||||
|
and run youre command
|
||||||
|
|
||||||
|
~~~
|
||||||
|
sleep 5 && XKB_DEFAULT_LAYOUT=de sudo ydotool type 'Hello World!' -d 20 && notify-send finish
|
||||||
|
~~~
|
||||||
|
|
||||||
### mit dotool
|
### mit dotool
|
||||||
|
|
||||||
|
~~~
|
||||||
sleep 5 && { echo typedelay 100; echo type ${PASSWORT}; } | DOTOOL_XKB_LAYOUT=de dotool && notify-send done
|
sleep 5 && { echo typedelay 100; echo type ${PASSWORT}; } | DOTOOL_XKB_LAYOUT=de dotool && notify-send done
|
||||||
|
~~~
|
||||||
|
|
||||||
### Zum suchen der libinput Treiber mit
|
### Zum suchen der libinput Treiber mit
|
||||||
|
~~~
|
||||||
libwacom-list-local-devices
|
libwacom-list-local-devices
|
||||||
for wort in /usr/share/libwacom/*; do if cat $wort | grep CTL-4100WL; then echo $wort; fi; done
|
for wort in /usr/share/libwacom/*; do if cat $wort | grep CTL-4100WL; then echo $wort; fi; done
|
||||||
|
~~~
|
||||||
|
|
||||||
### Port forwarding using OpenVPN client
|
### Port forwarding using OpenVPN client
|
||||||
|
|
||||||
|
~~~
|
||||||
vps# iptables -t nat -A PREROUTING -p tcp --dport 9987 -j DNAT --to-destination 192.168.1.3 (mein Homeserver wenn ich richtig verstanden habe)
|
vps# iptables -t nat -A PREROUTING -p tcp --dport 9987 -j DNAT --to-destination 192.168.1.3 (mein Homeserver wenn ich richtig verstanden habe)
|
||||||
vps# iptables -t nat -A POSTROUTING -p tcp --dport 9987 -j MASQUERADE
|
vps# iptables -t nat -A POSTROUTING -p tcp --dport 9987 -j MASQUERADE
|
||||||
|
|
||||||
|
@ -41,9 +63,12 @@ sysctl -w net.ipv4.ip_forward=1
|
||||||
iptables -t nat -A PREROUTING -d 50.xxx.xxx.xxx -p tcp --dport 8081 -j DNAT --to-dest 192.168.2.86:8081
|
iptables -t nat -A PREROUTING -d 50.xxx.xxx.xxx -p tcp --dport 8081 -j DNAT --to-dest 192.168.2.86:8081
|
||||||
|
|
||||||
iptables -t nat -A POSTROUTING -d 192.168.2.86 -p tcp --dport 8081 -j SNAT --to-source 10.0.2.42
|
iptables -t nat -A POSTROUTING -d 192.168.2.86 -p tcp --dport 8081 -j SNAT --to-source 10.0.2.42
|
||||||
|
~~~
|
||||||
|
|
||||||
### Find and Remove old Syncthing Files
|
### Find and Remove old Syncthing Files
|
||||||
|
~~~
|
||||||
find -name "*.tmp" -exec rm -vf {} \;
|
find -name "*.tmp" -exec rm -vf {} \;
|
||||||
|
~~~
|
||||||
|
|
||||||
### Setzt das Repository auf dem aktuellen HEAD zurück und löscht neue Dateien die bis dahin erzeugt wurden
|
### Setzt das Repository auf dem aktuellen HEAD zurück und löscht neue Dateien die bis dahin erzeugt wurden
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue