CentOS

Från wiki.soltec.se
Version från den 8 januari 2019 kl. 12.13 av Js146669 (Diskussion | bidrag) (Skapade sidan med 'How To Create a SSH tunnel from your laptop (SRC) through multiple hosts to a target (TGT) host Use Virtual Box for virtualisation from your windows laptop. '''Step #1''' Cre...')

(skillnad) ← Äldre version | Nuvarande version (skillnad) | Nyare version → (skillnad)
Hoppa till: navigering, sök

How To Create a SSH tunnel from your laptop (SRC) through multiple hosts to a target (TGT) host Use Virtual Box for virtualisation from your windows laptop.

Step #1 Create the tunnel from your vbox VM to the TGT server On the vbox vm or cygwin host create a tunnel to the IP and port number of the TGT server that you wish to access. $ ssh -L *:7777:<TGT IP>:8181 < TGT IP>

• The < - L * > allows connections from any interface. • 7777 is the port on your localhost/VM that is configured to connect to port 8181 of the TGT host. • Leave the connection open in it's own terminal window for your connection to work.

Step #2 Create the tunnel from your laptop to your VM On your laptop use PuTTy to create a tunnel to your vbox/cygwin VM instance.

Load/create a connection to your VM with the following configuration • IP: 127.0.0.1 Port: 22

Under <Connection> - < SSH > - < Tunnels > add the port on your laptop that you want to use to forward to the port you setup in the previous step on your VM 1. Laptop Port: 5555 (as an example) 2. VM Port: 7777 (created in step #1)

Enter the above info in the cfg box as per below. • Source port: 5555 • Destination: IP of your VM instance e.g. 10.0.3.15:7777

Click on < Apply >

Step #3 Test your connection by opening a BUI on your laptop and entering the following in the URL http://127.0.0.1:5555

You should see the web page presented by your TGT server on a browser direct from your laptop.