1

I have some hosts that I need to access that requires me to SSH hop through 4 or 5 different servers. I would like to be able to save these sessions and hops so that I don't have to constantly reference the network diagram hostnames to get around. Moba Xterm saved session only allows for one hop, I have read about other methods but none seem to allow you to save the session. Long term, I need to use our host inventory to spit out some kind of moba Xterm config file with ALL these preconfigured multihop sessions that will be loaded and used by many people monthly (so that everyone has the same ssh bookmarks instead of 100 people manually creating various versions of their own saved ssh bookmarked sessions... so I was seeking a file based approach, but I am open to alternatives.

At the moment, I was using a custom .ssh/config file to attempt to achieve results. This works well in that I can "ssh host1" in the mobaXterm terminal and it will prompt me for 3 passwords before letting me in to the right host, however I can't get this to work as a Moba saved/bookmarked session so it may not be the right solution:

# 1st Jump box
Host proxy1
  HostName proxy1.domain.org
  User USERNAME
  
   
# 2nd Jump box
Host host2
  HostName host2.domain.org
  User USERNAME
  ProxyCommand ssh -W %h:%p proxy1
Host proxy2
  HostName proxy2.domain.org
  User USERNAME
  ProxyCommand ssh -W %h:%p proxy1

  
# 3rd Jump box
Host host1
  HostName host1.domain.org
  User USERNAME
  ProxyCommand ssh -W %h:%p proxy2
gunslingor
  • 1,358
  • 12
  • 34

0 Answers0