Tag Info

Hot answers tagged

29

The command for forwarding port 80 from your local machine (localhost) to the remote host on port 8000 is: ssh -R 8000:localhost:80 oli@remote-machine This requires an additional tweak on the SSH server, add the lines to /etc/ssh/sshd_config: Match User oli GatewayPorts yes Next, reload the configuration by server executing sudo reload ssh. The ...


15

sshuttle is a transparent proxy server that forwards over a SSH connection and sets up a proxy by running Python scripts on the remote server. sshuttle can be run under the following conditions: client machine or router is Linux-based, FreeBSD or Mac OS administrative privileges on client access to remote network via SSH no administrator privileges on ...


13

There are two ways you can do this with SSH. Tunnel Everything with a SOCKS proxy Log in to the remote machine using the following command: ssh -D 8080 remote-host Now go to your browser's proxy settings, and configure it to use a SOCKS proxy with host name 127.0.0.1 and port 8080 (or whatever port you passed to the -D option). Now all pages you load ...


10

You cannot setup OpenVPN without root privileges because certain operations requires it. Prerequisites: you need to enable packet forwarding in your (iptables?) firewall Adding devices in operation: a special virtual device has to be added using ifconfig. Otherwise, no communication is possible between the server and client Depending on your needs, other ...


9

If your friends are able to SSH onto your computer, they are using some of your bandwidth and it is therefore impossible to completely block them access to your Internet connection. That being said, one solution would be to limit what your friends can do with your connection. You could set up a firewall that whitelists your friend's IPs and blacklists ...


6

Set up password-less SSH login according to this answer: ssh-keygen (you will be prompted for a password, leave it blank) ssh-copy-id user@userserver (enter your SSH login password for the last time) Add an startup entry for SSH:


5

Note that while you can disable TCP Forwarding by sshd, you need to go a lot further to restrict your users' outgoing activity. Giving them a shell means giving them a lot of power. For instance, if they can scp files to the server and execute files in /home, they can simply upload a pppd binary, and use that to run PPP over SSH. If you allow incoming ...


5

You can use sshuttle. While doing it over SSH isn't the greatest idea, it works, and I've lost count of how many times I've used it when I can't get into my VPN. This is how to get it set up: First, make sure git is installed by running: sudo apt-get install git Then, clone the code from github: git clone git://github.com/apenwarr/sshuttle You'll ...


5

install ssh First things first. You need ssh installed. Not just the client, the server too. Find out: $ which ssh /usr/bin/ssh $ which sshd /usr/sbin/sshd If which can't find them, you need to install: sudo apt-get install ssh sshd. The install process should set up everything, but just in case, make sure the ssh port (22), is open (if ufw is disabled, ...


4

You're setting up the redirection incorrectly. To get the SOCKS proxy you need to set up a dynamic redirect -- just one different click (see screenshot). You just need to set the port you want to use on localhost (here, 8888), and leave the remaining as is (n/a).


3

Here's what I use to load my webmin on my servers (which is firewalled away so only somebody with ssh access can see it): ssh -l oli -L 9090:localhost:9090 my-server-ip That connects me to the server and maps my local port 9090 to the server's P9090. I just browse at http://localhost:9090/ and I can see the webmin. If you're trying to connect to ...


3

that is very very AFAIK, but I decided to make answer and not a comment. OpenVPN uses certificates, and there should be some certificate/key exchange involved, so to establish tunnel it will take longer than IPSEC with peer negotiation and establishing of tunnel. Afterwards if same encryption is used you will see no difference. I should note, that OpenVPN ...


3

If you're using OpenVPN 2.1 or 2.2 you can find what you're looking for here. Bernhardt Schmidt has also put together a package for Ubuntu that includes the IPv6 payload patch integrated with OpenVPN. Since this question is old, hope this is still relevant.


3

To get a grip on what is happening with your networking, ifconfig is a great tool. It shows you all the interfaces on your computer and what addresses they have. Another good tool is ip -6 route show (IPv4 version: ip route show). 6to4 addresses always start with '2002:xxxx:xxxx:' (for example 2002:40b8:f37f:). In comparison, a teredo address will always ...


3

Yes, using ProxyCommand in your SSH config. Create an SSH configuration file in your home directory (unless you want to make this system-wide), ~/.ssh/config: Host unibroker # Machine B definition (the broker) Hostname 12.34.45.56 # Change this IP address to the address of the broker User myusername # Change accordingly Host ...


3

If you want to use putty as a dynamic proxy to go across the firewall, just select "Dynamic" and type any available source port you wish(ie. 9050), then press "Add". Things get done :D Go to your system proxy setting(ONLY configure in your browser if you want it to be the browser's proxy) , only set the socks v5 proxy as 127.0.0.1:yourport (ie. ...


2

This answer belongs to brandonchecketts. Assume You have two hosts named as Host-A and Host-B. Now we are going to create a SSH Tunnel between these two and make sure that Tunnel is up & live for all the time. Configuration Need to be done for Host-A: Open your terminal , turn into root and paste the code one after one useradd -d /home/tunnel tunnel ...


2

You need to let the first command run in the background and start the second one after the first has been initiated. I'm sure there is a more elegant way (of sorts) but this should do the trick. python ~/Downloads/usbmuxd-1.0.8/python-client/tcprelay.py -t 22:2222 & ssh -l root -p 2222 127.0.0.1 The ampersand at the end tells bash to run the python ...


2

An adaptation of MadMike's answer, you can use the following commands: python ~/Downloads/usbmuxd-1.0.8/python-client/tcprelay.py -t 22:2222 & while ! (: < /dev/tcp/127.0.0.1/2222) 2>/dev/null; do sleep 1 done ssh -l root -p 2222 127.0.0.1 This will execute the python program in the background, then wait (checking once a second) until ...


2

You can use sshuttle as described in How do I route my internet through a SSH tunnel?


2

Yes, the ever-popular PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/) is available through the repositories. To install it run: sudo apt-get install putty To set up tunneling it is quite easy. Open PuTTY Enter the IP address of the server you want to tunnel to (where 255.255.255.255 is in the image) After entering the IP address, click on ...


2

ssh tunnels are the wrong tool for this; you want a VPN (or possibly TOR, but probably not if you only care about a single fixed endpoint server).


2

Well... I'd say you can ssh your U machine and then issue the necessary lp or lpr commands. It's a bit of DIYish, but if ssh is already configured there's no need to open any ports. Maybe this would work, from command line: cat yourfile.pdf | ssh user@yourubuntumachine lpr But maybe there's a quicker way... Let's see what others say.


1

i found this how to i think it can be your solution HOWTO Print remotely through ssh access


1

You want a reverse Tunnel, try this: ssh -NT -R 4444:local.mydomain.com:80 user@remote.mydomain.com What this does is initiate a connection to remote.mydomain.com and forwards TCP port 4444 on remote.mydomain.com to TCP port 80 on local.mydomain.com. "-N" tells ssh to just set up the tunnel and not to prepare a command stream, and "-T" tells ssh not to ...


1

This has been asked on serverfault, too http://serverfault.com/questions/181660/how-do-i-log-ssh-port-forwards and there's a patch: http://blog.rootshell.be/2009/03/01/keep-an-eye-on-ssh-forwarding/


1

You can use ssh to tunnel any port under SSH. sudo ssh -L 139:localhost:139 user@server Now if you try to connect to the 139 port in your computer you will be connecting to 139 in the server. Notes: You need to use sudo to open a priviledged port(<1024) on your computer, not nice. It won't work if you're already using port 139 (i.e. you are running ...


1

How about using an ssh-key setup, as Source Lab suggested, but setting up your key with a pass phrase and make sure ssh-agent is running on your machine so it only needs to be entered once per login session. There's a few advantages doing it that way: - You can get automated password-less login (apart from first boot/login) whenever you issue your ssh ...



Only top voted, non community-wiki answers of a minimum length are eligible