Hot answers tagged ssh-tunnel
As a more concrete version of Kyle's answer, what you want to put in your ~/.ssh/config file is: host foo User webby ProxyCommand ssh a nc -w 3 %h %p host a User johndoe Then, when you run "ssh foo", SSH will attempt to SSH to johndoe@a, run netcat (nc), then perform an SSH to webby@foo through this tunnel. Magic! Of course, in order to do this, ...
Yes, just use /bin/false as shell and instruct the user to start the tunneling SSH process without executing any remote command (i.e. the -N flag for OpenSSH): ssh -N -L 1234:target-host:5678 ssh-host
Copying from source to target where target has sshd running: dd if=/dev/sda | gzip | ssh root@target 'gzip -d | dd of=/dev/sda' Copying from source to target via sshd_host when target is not running sshd. Target: nc -l -p 62222 | dd of=/dev/sda bs=$((16 * 1024 * 1024)) Source: ssh -L 62222:target:62222 sshd_host & Source: dd if=/dev/sda | nc ...
You are asking it to listen on your local port 22 and forward connections to a remote system's port 8090. You can't do that as your local port 22 is already taken by your local SSH server. I think what you are looking for is remote forwarding. Replacing -L 22:localhost:8090 with -R 8090:localhost:22 will tell the remote host to listen on port 8090 and ...
As you expected, this happens because SSH won't exit if there are outstanding connections going through the tunnel. If you exit your browser (and all other programs that are going through the port 9000 tunnel) then SSH should exit. The ssh man page says: The session terminates when the command or shell on the remote machine exits and all X11 and TCP ...
You don't need to bother with all that tunneling :-). Just let mysqldump stream its data using the SSH connection: ssh usr@host mysqldump -u dbuser -ppasswd my-database-name >dumpfile
You want to use key-based auth for this. There are dozens of questions here on SF on the topic as well as countless tutorials on the web that can walk you through how to get this set up. Not only will using key auth allow for the automation you need, but it is also a more secure means of authentication (assuming that you disable password auth at some ...
Yes. Configure the vsftp server to listen only on 127.0.0.1: this can be done in the vsftp.conf file: listen_address 127.0.0.1 To use this parameter, the server needs to be in standalone mode: listen yes If you want to use IPv6, use these entries instead: listen_ipv6 yes listen_address6 ::1 This is the same as the first, but uses IPv6. You'll ...
As a normal (non-root) user, you can't bind to ports < 1024.
Yes it is possible. Run ssh -D port user@host and set up your client to use your box as a SOCKS proxy. If you need a HTTP proxy specifically then you can use Proxychains and route it via the previous SOCKS.
Your problem is in binding a listener to localhost:22; there's already an sshd listening on that. Tunnelling an ssh connection through an ssh connection is completely lawful, and I do it all the time, but you need to pick unused ports for your forwarding listeners. Try me% ssh email@example.com -L 2201:192.168.25.100:22 then me% ssh localhost -p ...
From the puTTY documentation, specifically, 4.23 The Tunnels Panel section: Set one of the ‘Local’ or ‘Remote’ radio buttons, depending on whether you want to forward a local port to a remote destination (‘Local’) or forward a remote port to a local destination (‘Remote’). Alternatively, select ‘Dynamic’ if you want PuTTY to provide a local SOCKS 4/4A/5 ...
The error message ERROR 1130 (HY000): Host '22.214.171.124' is not allowed to connect to this MySQL server is coming from MySQL. To allow remote access for user root then you need to specifically allow this for the particular database, on the mysql server mysql -u root -p mysql> grant all privileges on somedatabase.* to 'root'@'126.96.36.199' ...
If you check the ssh man page, you'll find there is a config option called ExitOnForwardFailure and you can specify it on the command line by adding: -o "ExitOnForwardFailure yes" All the ssh config options are described in the ssh_config and sshd_config man pages. If you find the option is not supported, you may have to upgrade to a newer version of ssh. ...
WebDAV over SSL is as secure as the SSL implementations in the server and the client, the mechanism used for user authentication, and your trust with the certificates in use to authenticate the server computer and, if you're really paranoid, to authenticate the client computer (mutual SSL authentication isn't common, but it's certainly possible and used in ...
The reason you can't do this is because you're trying to forward port 22 on the local computer to port 8090 on the remote server and something is already running on port 22 on the local server. Mostly likely you have an SSH server running. You can fix this by changing the 22 to a different value. You can check to see if a port is free by running: # netstat ...
I'm not familiar with DownThemAll, but I see that it's a Firefox extension. So you could try running trickle to launch Firefox with a download limit (see man trickle). For example: trickle -d 20 firefox That will set a download limit of 20 KB/s. For completeness, users running Windows can do the same by using the Firefox Throttle add-on.
Avery Pennarun's sshuttle works similar to Vi's answer, but requires less setup and works on BSD and OS X as well as Linux.
This being a tunnel opened at a remote server, that server needs to have GatewayPorts set to yes in its /etc/ssh/sshd_config. Depending on what kind of users that server have you might want to use the Match option to limit that capability to your user. Match User middleuser GatewayPorts yes Do note that you probably want to add this Match block in the ...
There is no need to use nginx. In your ssh daemon configuration (it should be /etc/ssh/sshd_config) set GatewayPorts to clientspecified and reload it. This is necessary for other systems to be able to connect to your tunnel. Without it, only programs running on your server will be able to use it. Now all you need to do is modify your ssh command to listen ...
The answer from jscott is correct, however after reading it, it was still not completely clear to me when should I use local and when remote. So I researched further, and I have found the answer here: Use local if you need to if you have a service running on a machine that can be reached from the remote machine, and you want to access it directly from the ...
I would ask the IT department. There is a reason why they have installed this firewall and what you are trying to do may be against the security policy. They have to know that you need to access this server from outside of the company network. If there is no problem regarding the security policy, they will help you to have this access.
In PuTTY go to Settings -> Connection -> SSH -> Tunnels. You can add port forwards there. For reverse forward, enter source port, and destination, but choose 'Remote' instead of 'Local'. In your case, put 6000 in to source port, localhost:7000 in the Destination, and choose Remote.
I know cherokee management works this way, so let's say you have bound your webserver to your localhost on port 8080 ssh -L 8080:localhost:8080 your_servers_ip After that you can access the remote interface through http://localhost:8080 and every request will be forwarded to the remote IP running your webserver.
ssh -L <localport>:<server2>:<server2-port> user@host Example: ssh -L 5050:server2.company.com:5050 user@host Add -f to let the ssh session run in the background. Add -g to let other hosts connect to server1s locally forwarded port.
By far, the easiest way is to just copy it via scp. Plus, this syntax actually works unlike some of the other suggestions. You can't beat this syntax for ease. It allows you to recursively copy, rsync or what ever you'd like without the hassle of considering potentially complex pipes. This syntax is intuitively clear, will be more readily supportable ...
I trust you can already SSH to a system on the remote private network (10.0.0.0). If your local system is running openssh, add to your $HOME/.ssh/config: Host gatewaymachine LocalForward 12080 remote_ip:portnum Where 'remote_ip' is the IP address of the remote clustermachine system where gdbserver runs, and portnum is the port that it listens on. SSH to ...
You can background SSH doing: <enter>~&
You can use the ProxyCommand directive in your ~/.ssh/config file, for example to use netcat as the relay: host server2 ProxyCommand ssh server1 nc server2 22 The you would just use 'ssh server2'. The man page information for this directive is found in 'man ssh_config'
In Linux: iptables -t nat -A OUTPUT ! -d 127.0.0.0/8 -j REDIRECT --to 1081 Run program that listens 1081, retrieves actual, non-redirected destination address, negotiates with SOCKS server and relays. I have written such program for private usage in Perl (prototype quality) and writing a better version in C. It is not yet published. Update: now ...
Only top voted, non community-wiki answers of a minimum length are eligible