Ssh
SSH over SOCKS5 proxy
# Install tsocks
sudo apt install tsocks # Ubuntu
sudo pacman -S tsocks # Arch
# Put content below into /etc/tsocks.conf
server = localhost
server_port = 5600
server_type = 5
# On first terminal
ssh jumphost -D localhost:5600
# On second terminal
alias sst='tsocks ssh'
sst desthost
SSH X-Forwarding
Server Setup
sudo yum install xorg-x11-xauth xterm
sudo vim /etc/ssh/sshd_config
# Change X11Forwarding to yes
sudo service sshd restart
On Mac OSX
- Install XQuartz from https://www.xquartz.org
- ssh -Y user@server
- echo $DISPLAY
- Should have something like "localhost:10.0"
- xauth list
- Should have something like "us01vlomr001/unix:10 MIT-MAGIC-COOKIE-1 467d6d0e614d184ceff186651ee364e5"
- xterm # You should have xterm run on your local but from remote server
- To have it working as another user, for example, oracle user
- sudo su - oracle
- echo $DISPLAY # Should have same value as 3a
- xauth list # It's okay if error or no value
- Copy the whole string from 4a without quotes
- xauth add "copied value" # i.e.: xauth add us01vlomr001/unix:10 MIT-MAGIC-COOKIE-1 467d6d0e614d184ceff186651ee364e5
- xterm # xterm should run locally but from remote server
On Windows
- Install putty from http://www.putty.org
- Install Xming from http://www.straightrunning.com/XmingNotes
- Create a copy of the Xming shortcut for yourself on desktop.
- Right click your shortcut and Properties
- Change :0 to :X, X means a different number. Each person should have a different number. – If you're on the bastion hosts in DC4/NY2, reserve a personal display number on this page XMing setup for X11 tunneling
- Run your Xming shortcut
- Running
- Putty
- Under Connection -> SSH -> X11, tick "Enable X11 forwarding" and enter"localhost:X", replace X with your number
- Cygwin
- export DISPLAY=localhost:X, replace X with your number
- Continue from step 3 in "On MAC OSX" section
SSH Proxying
Reference
http://www.webhostingtalk.com/showthread.php?t=539067
Using Putty
- SSH >
- Enable compression
- Preferred SSH protocol version 2
- Tunnels >
- Dynamic
- Sourece Port: 8080
- Click Add
- Session >
- Enter name and Save
Using SSH on Linux
ssh -C -D [localhost]:8080 user@host
Browser Configuration
Set proxy to use socks