'SSH.md' updaten
This commit is contained in:
17
SSH.md
17
SSH.md
@@ -17,13 +17,26 @@
|
|||||||
|
|
||||||
#### Port to be internaly binded on remote machine
|
#### Port to be internaly binded on remote machine
|
||||||
|
|
||||||
`ssh -R <remoteport>:localhost:<localport> <USERNAME>@<SYSTEM>`
|
`ssh -R <remoteport>:<address in local network or localhost>:<localport> <USERNAME>@<SYSTEM>`
|
||||||
|
|
||||||
#### Port to be binded to remote machine
|
#### Port to be binded to remote machine
|
||||||
|
|
||||||
`ssh -g -R *:<remoteport>:localhost:<localport> <USERNAME>@<SYSTEM>`
|
`ssh -g -R *:<remoteport>:<address in local network or localhost>:<localport> <USERNAME>@<SYSTEM>`
|
||||||
|
|
||||||
|
* -R : Remote forward
|
||||||
|
* -N : Do not execute a remote command
|
||||||
|
* -g : forward to remote network
|
||||||
|
|
||||||
### SSHD config (on remote where ports are forwarded to)
|
### SSHD config (on remote where ports are forwarded to)
|
||||||
* GatewayPorts no : only allows the remote system to connect
|
* GatewayPorts no : only allows the remote system to connect
|
||||||
* GatewayPorts yes: allows the remote network to connect to the forwarded port
|
* GatewayPorts yes: allows the remote network to connect to the forwarded port
|
||||||
* GatewayPorts clientspecified : allows the remote network to connect to the forwarded port when -g switch is used
|
* GatewayPorts clientspecified : allows the remote network to connect to the forwarded port when -g switch is used
|
||||||
|
|
||||||
|
|
||||||
|
## SSH Local forward (makes remote port apear on local machine)
|
||||||
|
|
||||||
|
#### Remote port to be binded on local machine
|
||||||
|
|
||||||
|
`ssh -L <bindPort>:<address in remote network or localhost>:<remote port> <USERNAME>@<SYSTEM>`
|
||||||
|
|
||||||
|
* -L : Local forward
|
||||||
Reference in New Issue
Block a user