2020-11-26 17:38:25 +00:00
|
|
|
# ssh
|
2021-04-20 18:56:58 +00:00
|
|
|
|
2021-01-24 16:52:22 +00:00
|
|
|
![ssh](img/ssh.png)
|
2021-04-20 18:56:58 +00:00
|
|
|
|
2020-11-26 17:38:25 +00:00
|
|
|
## port forwarding
|
2021-04-20 18:56:58 +00:00
|
|
|
|
|
|
|
```bash
|
2020-11-26 17:38:25 +00:00
|
|
|
Ssh -L 2000:toto:80 Vincent@tata
|
|
|
|
```
|
2021-04-20 18:56:58 +00:00
|
|
|
|
2020-11-26 17:38:25 +00:00
|
|
|
Redirigé le port local 2000 vers le port 80 de toto en passant par un tunnel via tata
|
|
|
|
|
|
|
|
-f pour laisser la commande en arrière plan
|
|
|
|
-R pour forwarder un port distant ici avec -R le port 2000 de tata sera rediriger vers le 80 de toto en passant par le client
|
|
|
|
|
|
|
|
## ingore know host file
|
|
|
|
|
2021-04-20 18:56:58 +00:00
|
|
|
```bash
|
2020-11-26 17:38:25 +00:00
|
|
|
ssh -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null
|
2021-01-24 16:52:22 +00:00
|
|
|
```
|
2021-11-06 09:05:14 +00:00
|
|
|
|
|
|
|
## connection over Proxy socks
|
|
|
|
|
|
|
|
````bash
|
|
|
|
-o "ProxyCommand=nc -X 5 -x 127.0.0.1:1080 %h %p"
|
|
|
|
```
|
|
|
|
````
|