Archived
1
0
This repository has been archived on 2023-11-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
linux/SSH.md
2019-10-15 20:50:52 +00:00

1.1 KiB

SSH SOCSK (ProxyTunnel)

Command

ssh -C -D <proxyport> <USERNAME>@<SYSTEM>

  • -C : enables compression
  • -D : specifies Socks proxyport

Firefox

  1. go to Edit -> Preferences -> Advanced -> Network -> Connection -> Settings...
  2. check "Manual proxy configuration"
  3. make sure "Use this proxy server for all protocols" is cleared
  4. clear "HTTP Proxy", "SSL Proxy", "FTP Proxy", and "Gopher Proxy" fields
  5. enter "127.0.0.1" for "SOCKS Host"
  6. enter "1080" (or whatever port you chose) for Port.

SSH Remote forward (makes local port apear on remote machine)

Port to be internaly binded on remote machine

ssh -R <remoteport>:localhost:<localport> <USERNAME>@<SYSTEM>

Port to be binded to remote machine

ssh -g -R *:<remoteport>:localhost:<localport> <USERNAME>@<SYSTEM>

SSHD config (on remote where ports are forwarded to)

  • GatewayPorts no : only allows the remote system to connect
  • 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