Forum

Tunnel VNC over SSH through a Command & Control server?  

  RSS

oiiu8
New Member
Joined: 3 weeks  ago
Posts: 1
05/04/2017 8:44 pm  

Hi guys

Wondering if you have any experience with this.

Imagine (if you will) that you have a remote box with Kali installed that is properly configured to use autossh to connect to a VPS in "da cloud" every time it boots, using the following entry in

$ /etc/rc.local

# Auto Connect to VPS
# POLL time will check to see if the ssh connection is up every 300 seconds (5 minute.) AUTOSSH_POLL=300 # GATETIME sets the verification time for a valid connection (30 seconds.) AUTOSSH_GATETIME=30 export AUTOSSH_POLL AUTOSSH_GATETIME autossh -M 20000 -N -f -i /root/.ssh/id_rsa -R 6868:localhost:22 root@<VPS-IP-IN-DA-CLOUD> &

From a (OS X) "Workstation" you could log into VPS,

$ ssh root@<VPS-IP-IN-DA-CLOUD>

Once logged in to the VPS, you could run,

$ ssh [email protected] -p 6868

Successfully logging into your remote Kali terminal, Hooray!

 

NOW...

 

What if you ALSO wanted to tunnel a VNC connection over SSH through the VPN into the remote Kali box. How would you accomplish this?

Googleing finds many articles how to connect direct to a remote SSH host and tunnel VNC over SSH.

I have yet to locate an article that details  OS X SHH > VPS SSH > KALI SSH VNC .

Would the Kali box need to be configured to tunnel VNC to the VPS on say port 5901 and then the VPN configured to forward the port 5901 to the OS X machine when connected, then the OS X machine connect to localhost:5901  ,   passing through the VPS and landing on the Remote Kali box?

Maybe I'm complicating this too much, and once the OS X machine is connected to the remote Kali terminal through VPS there is an easy command to run that would allow the VNC over SHH to function. 

My brain hurts. 

What do you think?

How would you do this?

 

 

 

 


ReplyQuote
  
Working

Please Login or Register

%d bloggers like this: