I am a long time xterm user. As a Sys Admin I connect to many, many Linux systems. My practice has been to use XQuartz to connect to a central system from which I can access all the other systems. There in my Linux account I have a bash script which takes a system name for an argument and opens a new xterm and connects with ssh (using keys) to the system I need. Thus with a very few key strokes I can access any of my systems in a new window. I would like to try using iTerm2 but I can't figure out how to start an iTerm on my mac from my remote server. Is this possible? Thank you.

  • Is your Mac the central system here or one of others (clients)? Or, in other words, which system initiates the connection?
    – nohillside
    Commented Apr 13, 2021 at 19:46
  • 1
    Is your problem about whether Xterm2 can initiate an X11 session with outside servers, like Xterm in XQuartz? I just wanted to make sure that was the goal. I also would love Xterm2 to manage X11 sessions and don’t know if your question covers that scenario.
    – tonecurves
    Commented Apr 25, 2021 at 15:10

2 Answers 2


No you can't start iTerm from a remote server.

But then macOS is not XWindows so you would use a different way.

The way is to have the information about all the servers on your Mac

Create a profile for each server in ITerm each one opening a ssh session.

Then to access any system in a new window just open the correct Profile.

To speed things up each profile can be give a different keyboard shortcut.

  • Thanks. Since I support several hundred virtual systems This is not a useful solution. I guess I am sticking with XQuartz. Commented Apr 13, 2021 at 17:14
  • @user3439894 that open will open it on the machine that it is tun on - so if you ssh and then run open iTerm opens on the remote machine - which is not useful. (NeXT used to be able to this as does XWindows- MacOS and MS Windows need remote viewers like vnc to show the whole screen on the local machine)
    – mmmmmm
    Commented Apr 26, 2021 at 11:20
  • mmmmmm, That makes sense, thanks for the response. +1 Commented Apr 26, 2021 at 12:53

I'm not convinced that this is "impossible". I'm assuming that the connection that initiates from the remote box ssh's into yours?
Maybe leveraging something like tmux on the remote server and within the script send the command to ssh to your machine?
This article might be worth peeking at.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .