10

I use MobaXterm for remote access to servers running in the cloud. For development and admin purposes, these servers expose admin application on local network interfaces. For example, Tomcat will expose 127.0.0.1/manager.

Since I prefer not to have to expose these services to the internet, I've set up ssh tunnels in MobaXterm to connect to these web applications on a local port through local port forwarding, which is easy to set up with the application itself.

My question: How can you get MobaXterm to automatically start a tunnel when a session is opened and to stop/close them when the session is ended?

I know a client like Putty would do this by default, but I don't want to use different clients for different jobs if I don't have to and MobaXterm has other features I need that Putty doesn't.

kenorb
  • 155,785
  • 88
  • 678
  • 743
Grismar
  • 27,561
  • 4
  • 31
  • 54

2 Answers2

2

You can setup new SSH tunnels in Tunneling section (or from the MobaXterm's Tools menu, you can start MobaSSHTunnel). This will show a graphical port forwarding tool, where you can setup a new SSH tunnels which can be configured to be started automatically at MobaXterm startup by selecting Autostart from the tunnel settings.

MobaXterm's MobaSSHTunnel, SSH tunnel, dynamic local remote port forwarding

kenorb
  • 155,785
  • 88
  • 678
  • 743
  • Thanks for the useful illustration. – Ghasem Naddaf Aug 16 '18 at 08:16
  • 5
    Thanks for the feedback, I'm aware of the built-in wizard for setting up the connection, of which you've provided a screenshot, but your suggestion for auto-starting would start the tunnel on MobaXTerm startup. I only want the tunnel to be opened when a specific session is started. This way, I can connect to services running on a specific port depending on what server I'm connected to. Your suggestion would *always* start and having multiple tunnels mapped to the same local port would be an issue. – Grismar Aug 29 '18 at 04:20
  • 1
    This solution doesn't quite work for me, because it requires me to log in again on the SSH server (where I need to type a long password, unfortunately). With Putty and also with OpenSSH the tunnel is established together with the interactive session, requiring only one login for both. – oliver Apr 13 '19 at 12:59
0

Try to use MyEn Tunnel: https://myentunnel.informer.com/

There is an option to Connect on Startup

enter image description here