Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

SSH tunnel help


  • Please log in to reply
4 replies to this topic

#1 Tom2-0

Tom2-0

  • Members
  • 2 posts
  • OFFLINE
  •  

Posted 31 March 2018 - 11:17 AM

Hi folks,

 

I'm testing how to set up an ssh tunnel, but when I do it through putty the prompt needs to be up and won't work closed. Any ideas on how to set this up?
 
I have another program working on the VPS, so I cannot setup OpenVPN as much as I would like. I need to set this up as I frequently access files/login in public areas as I don't have any other choice.
 
The command I used in prompt ssh -D 1067 -f -C -q -N user@MY_VPS_IP on ubuntu 16.04


BC AdBot (Login to Remove)

 


#2 rufwoof

rufwoof

  • Members
  • 135 posts
  • OFFLINE
  •  
  • Local time:04:33 PM

Posted 01 April 2018 - 06:35 PM

For Debian desktop to OpenBSD server using cli I login using

ssh -l username hostname

i.e. something like

ssh -l rufwoof rufwoof.com

(made up hostname).

 

 

To copy files from my desktop to the server I use something like

scp filename rufwoof@rufwoof.com:/home/rufwoof/.

or from server to desktop

scp rufwoof@rufwoof.com:/home/rufwoof/filename .

i.e. similar to normal cp copy, but with username@hostname:path/filename format.


OpenBSD (-current)


#3 hostechsupport

hostechsupport

  • Members
  • 9 posts
  • OFFLINE
  •  
  • Local time:10:03 PM

Posted 17 April 2018 - 08:46 AM

1.  Install the package
                 
     sudo apt-get install sshuttle
 
2.  connect to the SSH tunnel and redirect your default route to go through it:
 
     sshuttle -r username@sshserver 0.0.0.0/0 -vv --dns
 
3.  TCP traffic will be forwarded through the SSH connection with DNS request. 


#4 Tom2-0

Tom2-0
  • Topic Starter

  • Members
  • 2 posts
  • OFFLINE
  •  

Posted 19 May 2018 - 12:04 PM

For future readers, sshuttle only works with Linux/Mac no windows/mobile or browser support.


Edited by Tom2-0, 19 May 2018 - 12:04 PM.


#5 rufwoof

rufwoof

  • Members
  • 135 posts
  • OFFLINE
  •  
  • Local time:04:33 PM

Posted 26 May 2018 - 06:36 AM

Reverse ssh can be useful in some instances. If you can ssh into another box, but that box can't ssh to your box, then setting up a ssh from your box to the other box using something like ssh -R 19999:localhost:22 192.168.1.9 , and then on that other box you can ssh back through that ssh link using something like ssh -p 19999 user@localhost

 

Trick is to keep that first ssh open and/or set to auto start at startup, so that the second box can ssh whenever it needs to.


OpenBSD (-current)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users