22

Since OpenSSH 7.3, you can use -J or -o ProxyJump to specify the bastion/jump host. Therefore, to SSH to node2 via node1: ssh -J you@node1 you@node2 SCP doesn't have the -J argument, but it does allow -o, so this works: scp -o ProxyJump=you@node1 file.txt you@node2:~


19

Can be achieved transparently with this snippet in ~/.ssh/config: Host sockstunnel ProxyCommand ssh -D 3128 localhost nc -q 1 localhost 22 Host target RemoteForward 3128 localhost:3128 ProxyCommand ssh -W target:22 sockstunnel Details We want a reverse DynamicForward. This is achieved using two ssh commands: ssh -D 3128 localhost ssh -R ...


18

Here's my answer for completion: I ended up using ssh -R ... for tunneling, and using socat on top of that for redirecting network traffic to 127.0.0.1: tunnel binded to 127.0.0.1: ssh -R mitm:9999:<my.ip>:8084 me@mitm socat: mitm$ socat TCP-LISTEN:9090,fork TCP:127.0.0.1:9999 Other option is to do a local-only tunnel on top of that, but i find ...


13

You can also use a double forward if you won´t or can change /etc/ssh/sshd_config. First forward to temporary port (e.g. 10080) on loopback device on the remote machine, then use local forward there to redirect port 10080 to 80 on all interfaces: ssh -A -R 10080:localhost_or_machine_from:80 user@remote.tld "ssh -g -N -L 80:localhost:10080 localhost"


13

Yes. Goto Extras->Options->General ...click on "Configure" for proxy settings. Change to manual proxy and for Proxy IP enter socks5://127.0.0.1 and the port you are using. Obviously change the 127.0.0.1 to whatever IP you are wanting to use.


12

local$ ssh -R 1080 remote remote$ curl --socks5 localhost https://example.com since OpenSSH 7.6 ssh(1): add support for reverse dynamic forwarding. In this mode, ssh will act as a SOCKS4/5 proxy and forward connections to destinations requested by the remote SOCKS client. This mode is requested using extended syntax for the -R and RemoteForward ...


11

how to proxy smb to a windows 10 client: short description with ssh n stuff for tunneling launch hdwwiz.exe network adapters -> Microsoft KM-TEST Loopback Adapter -> finish disable everything except ipv4 in that new network sink inside the ipv4 settings set up a ip, 255.255.255.255 as subnet mask and disable netbios if you cannot decide on an ip ...


11

In case anyone else finds this, there is a work around... you just need to reformat the tunnel with a specific bind address like this: ssh -L 127.0.0.1:8022:173.22.0.1:22 username@172.11.0.1 From reading through the bug listing linked in the other answer, it looks like the issue is in the IPv6 subsystem, so I'm guessing this works by forcing IPv4. Either ...


11

The Bitvise SSH Client user interface does not provide an option to start the profile automatically when Windows 10 starts up. Instead, you can create a shortcut to Bitvise with the "-loginOnStartup" option. The steps below are a lot easier than creating a batch file. In your Bitvise Profile, select these options: Uncheck "Open Terminal" Uncheck "Open ...


9

I have drawn some sketches For making it easier to understand the tunnel mechanisms, watch these sketches. The machine, where the ssh tunnel command is typed is called »your host«. Introduction local: -L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. ssh -L sourcePort:forwardToHost:...


9

I do not know how Ansible uses OpenSSH. But OpenSSH itself supports "multihop logins". Since OpenSSH 7.3, you can use -J (jump) switch like: ssh -J user1@host1.example.com user2@host2.example.com The -J is an equivalent of ProxyJump directive: ssh -o ProxyJump=user1@host1.example.com user2@host2.example.com Note that with file transfer tools, ...


9

TCP port 49900 is within the port range (49152 to 65535) that is reserved for dynamic ports. You should not open services using ports in that range. The recommended port range is from 1024 to 49151.


8

I believe the OP is asking for a way to tunnel all traffic not just ones that let you set proxy settings. The problem is that some programs do not let you specify proxy settings which is where sshuttle comes into play. sshuttle allows any program to go through your tunnel not just ones that you specify a proxy server.


8

I feel that you are expecting firefox to connect to your Debian SSHD service directly? If that's the case, your understanding of SSH tunnel is completely wrong. You need to run ssh client on the client machine, to 1) connect to your server and 2) start a local socks proxy. Firefox would then connect to your local socks proxy. See below diagram: +-------------...


7

I have tried to better explain the accepted solution below. Let us assume "machine A" and "machine B" are both behind NAT firewall. While both have ssh access to a remote "machine R" (say a VPS). R -> A ssh -R 20000:127.0.0.1:22 user@RemoteHost Above command executed on machine A. Create a tunnel from R (port 20000 of R) to A (port 22 of A) (reverse ...


7

If computer A is reachable via SSH, an SSH tunnel would be indeed the way to go: computer-B$ ssh -L 1234:localhost:80 computer-A.example.com Once you're logged in, point your browser to http://localhost:1234 and the webserver on computer A should respond. With putty, there's a "Tunnels" menu underneath the "SSH" option (left side) where you can configure ...


7

In layman terms, Secure Shell or SSH is established between two computer programs : On the server side : A daemon (system service) that listens on a TCP/IP port and accepts connections. It receives encrypted packages of several types, which it executes. On the client side : A client which connects to the server and transfers commands. The connection ...


6

After some research and experimentation this combination of options seem to do the trick: command="",restrict,port-forwarding,permitopen="localhost:80" Let me go through each of them individually: command="" disallows any command to be executed using this key restrict Disable all options, such as TTY allocation, port forwarding, agent forwarding, user-...


5

This is the top google result for this question, so I will put my answer here. I stayed up all night filtering the results, and came up with a long complex command that shows you only your reverse ssh tunnels in this format: publicipaddress:remoteforwardedport Here is the code, I am running Ubuntu Server 12. I am running reverse ssh tunnels that forward ...


5

I tried many solutions like SSH tunnel managers, but all were inconvinient for me: too many configuration screens, sometimes buggy (one time SSH tunnel manager purged all! settings I had! So I had to restore settings for all 30 tunnels). So they all lost my trust. That's why I come up with custom Powershell script, easy configurable, changeable, small, but ...


5

This is achievable if you can mosh onto the first hop server which itself provides a (transparent) regular SSH connection to the end point. [1] You can configure the first-hop to endpoint connection via any means available. I think this would solve my use case of simply wanting to use mosh's lag-friendly interface from my end. It is also possible in theory ...


5

Try leaving off the "root@" portion of the -R argument: ssh -v -R hostname:19999:localhost:22 root@hostname With the four-parameter version of -R, the four parameters are the address and port to listen for connections on the remote host, and the address and port to forward to from the local host. You're giving a value of "root@hostname" as the remote bind ...


5

My understanding of SSH is that it requires a tunnel be used so that passwords and data can be encrypted. SSH can also be called 'tunneling'. Correct? SSH means "Secure shell". It's actually a multiplexed protocol with different functionalities (remote shell, file transfer, tunneling, etc.) all packed into the same connection. I assume that SFTP means ...


5

mosh (Mobile Shell) is what you are looking for, though you need it on both client and server side... https://mosh.mit.edu


5

In terms of security, three additional methods come to my mind. A: use public key authentication To add to security, you can set up your SSH server to use public key authentication. That is, either additionally to or instead of a strong password, the connection will be opened only if the SSH client provides the private key which matches the public key on ...


5

You should only need to forward port 445. In putty the local port should be loopbackIP:44445(or any other unused port) and the forward destination should be localhost:445 or 127.0.0.1:445. It worked for me follow the procedure in this link: http://how-to.cc/setup-windows-filesharing-over-ssh Note that all reference to the service 'smb' needs to be ...


5

You don't need any specialized triggers on relayhost. All you need to do is use remote port forwarding with ssh -R instead of local port forwarding with ssh -L. Now if i understand it correctly - your problem is that neither localhost nor host1 have publicly accessible IP - both are behind NAT. Otherwise it would be easier create tunnel from host1 to ...


5

You should be able to do: Host myhost-* Hostname localhost User me ServerAliveInterval 30 ProxyCommand ssh -q external-relay /usr/bin/nc -w 90 localhost 9889 followed by: Host myhost-1 LocalForward ... Host myhost-2 RemoteForward ... : myhots-1 and myhost-2 will derive settings from myhost-* (but CANNOT override them). You ...


5

After reading this answer, I updated the ~/.ssh/config file as follows: Host hostB HostName hostB User userB ProxyCommand ssh userA@hostA -W %h:%p and I was able to connect.


4

Two great tools : Both have those features : Could be automated at boot Opensource Manage many tunnels at the same time Could reside in the system tray Free of charge (Mobaxterm have a free version) Encrypt stored password 1. Mobaxterm Site : http://mobaxterm.mobatek.net/ Capture : 2. SSH Tunnel Manager Site : https://code.google.com/archive/p/ssh-...


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