Introduction
MobaXterm is a powerful all-in-one tool for remote computing, which includes a terminal, SSH client, X11 server, and many other features. This article will focus on how to open an existing SSH session in a new tab in MobaXterm, making it easier to manage multiple sessions at once.
Saving SSH Sessions in MobaXterm
To save an SSH session in MobaXterm, follow these steps:
- Launch MobaXterm and click on the "Session" button in the top left corner.
- In the "Session settings" window, select "SSH" as the session type.
- Enter the remote host's IP address or domain name, and your username.
- Check the "Save session" box and provide a name for the session.
- Click "OK" to create the session.
Session settings:
- Type: SSH
- Remote host: your_remote_host
- Username: your_username
- Save session: [checked]
- Session name: my_saved_session
Opening an Existing SSH Session in a New Tab
Unfortunately, MobaXterm does not natively support opening an existing SSH session in a new tab using the GUI. However, you can achieve this by using a workaround with a custom session command.
Customizing the Session Command
To create a custom command that opens a new tab with the existing SSH session, follow these steps:
- Create a new session as described in the section "Saving SSH Sessions in MobaXterm" above.
- In the "Session settings" window, click on the "Advanced SSH settings" button at the bottom left.
- In the "SSH settings" window, check the "Use a custom command instead of "ssh -Y"" box.
- Replace the default command with "
terminal -e 'bash -l -i -t -x -c "cd; exec bash -l"'" (without the quotes). - Click "OK" twice to save the custom command.
Session settings:
- Type: SSH
- Remote host: your_remote_host
- Username: your_username
- Save session: [checked]
- Session name: my_saved_session
Advanced SSH settings:
- Use a custom command instead of "ssh -Y": [checked]
- Custom command: "terminal -e 'bash -l -i -t -x -c "cd; exec bash -l"'"
Opening the Existing SSH Session in a New Tab
To open the existing SSH session in a new tab, follow these steps:
- Launch MobaXterm and click on the "Session" button in the top left corner.
- In the "Saved sessions" list, select the session you want to open.
- Click on the "+" button on the far right of the existing tabs, just before the "X" button.
Additional Tips
MobaXterm has several features that can help you manage multiple SSH sessions more effectively.
Tab Titles
You can customize the tab titles to distinguish one tab from another easily. Right-click on the tab's title, select "Custom tab title," and enter a new name for the tab.
Keyboard Shortcuts
MobaXterm offers several keyboard shortcuts for working with tabs. Some of the useful shortcuts include:
Ctrl+T: Open a new tabCtrl+Shift+W: Close the current tabCtrl+\[number]: Move to the specified tab