# Use Terminal to make remote connections on OSX

**URL:** https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233
**Category:** ParaView Support
**Created:** [May 14, 2021, 3:00pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233 "2021-05-14T15:00:31Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [May 14, 2021, 3:00pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/1 "2021-05-14T15:00:31Z")

</div>

When connecting to a remote machine on OSX, the system opens an xterm window to make the ssh connection to the remote machine. For this to work, you need to have XQuartz installed and running.

Not all users have XQuartz installed and running all the time. However, all Macs come with the `Terminal` program that can be used to run a shell script and interact with it. This is the solution that most applications on Mac use when they need to launch a shell script that might need user input. Using `Terminal` is a better solution.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 14, 2021, 3:28pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/2 "2021-05-14T15:28:41Z")

</div>

ParaView is already using Terminal for the native SSH support, is this what you are reffering to ?

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [May 14, 2021, 3:32pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/3 "2021-05-14T15:32:29Z")

</div>

Are you sure? When I, for example, connect to summit, it pops up an _xterm_ window, not a Terminal.app window, to run ssh in.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 14, 2021, 3:40pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/4 "2021-05-14T15:40:08Z")

</div>

the executable to use can be overriden in the server configuration, so maybe that is why, but there is code to detect and use Terminal already:  
[https://gitlab.kitware.com/paraview/paraview/-/blob/master/Qt/Core/pqServerConfiguration.cxx#L470](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Qt/Core/pqServerConfiguration.cxx#L470)

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [May 14, 2021, 4:06pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/5 "2021-05-14T16:06:23Z")

</div>

xterm tunnels the connection from the ParaView server to the client. I am not sure if Terminal can do that. This may be the reason why we use xquarts - but I have not checked.

I know I tried to use the system ssh in Windows instead of putty, and it would just not connect even if it supports the same options. This is why we require putty in Windows.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 14, 2021, 4:15pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/6 "2021-05-14T16:15:18Z")

</div>

> [@danlipsa](#):
>
> xterm tunnels the connection from the ParaView server to the client. I am not sure if Terminal can do that. This may be the reason why we use xquarts - but I have not checked.

It can, it depends only on ssh.

> [@](#):
>
> I know I tried to use the system ssh in Windows instead of putty, and it would just not connect even if it supports the same options. This is why we require putty in Windows.

putty is required on windows because of this issue in windows OpenSSH implementation:

> <https://github.com/PowerShell/Win32-OpenSSH/issues/1265#issuecomment-812925548>
>
> \*\*Server OperatingSystem\*\*
> any linux based os
> 
> \*\*Client OperatingSystem\*\*
> Wi…ndows 10 with Spring Update
> 
> \*\*What is failing\*\*
> There is definitely a bug in Microsoft OpenSSH implementation from 2018 Spring Update.
> 
> How to test it :
> On the local (Windows 10), install Python3, Putty and make sure ssh is available.
> Then
> 
> 1. Run a python http server in a terminal (on port 8000 by default)
> 
> \`python -m http.server\`
> 
> 2. Create a reverse connection ssh tunnel
> 
> \`ssh -R 8080:localhost:8000 user@remote\`
> 
> On the remote, connect trough the tunnel with telnet
> On The remote, connect to it trough telnet
> 
> \>telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^\]'.
> Connection closed by foreign host.
> 
> The tunnel is still runnning but telnet disconnect almost instantly after the connection.
> 
> If you replase \`ssh\` by the plink.exe from putty, it works flawlessly and you can connect with a browser.
> 
> 
> \*\*Expected output\*\*
> \`\`\`
> \>telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^\]'.
> \`\`\`
> 
> \*\*Actual output\*\*
> \`\`\`
> \>telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^\]'.
> Connection closed by foreign host.
> 
> \`\`\`

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [May 14, 2021, 5:16pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/7 "2021-05-14T17:16:04Z")

</div>

Hi Ken,  
When I use my Mac to connect to chama, it uses a terminal. It does not use an xterm. Further, I don’t have an xterm loaded on my Mac. I.e., “xterm” fails with “command not found.” Note that we don’t use port forwarding. Call me if you want to see how we do it.

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [May 14, 2021, 5:41pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/8 "2021-05-14T17:41:56Z")

</div>

OK. That sounds like my bad. I was looking at some older tutorial slides that said XQuartz was needed and I observed it launching an xterm on my machine (where I already had XQuartz installed). If it actually launches Terminal when XQuartz is not installed, then this request is already implemented.

(I’m not sure how to close out the feature requests in discourse.)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 14, 2021, 5:46pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/9 "2021-05-14T17:46:46Z")

</div>

Since this thread contains interesting information, I’ll just move it to another category.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [July 26, 2021, 6:45pm UTC](https://discourse.paraview.org/t/use-terminal-to-make-remote-connections-on-osx/7233/10 "2021-07-26T18:45:31Z")

</div>

By the way, here is an example for the client side on a Mac:

```auto
<!-- NOTE - On a Mac, this goes in the root of the Mac ParaView tree, i.e., in Contents. -->
<Servers>

 <Server name="Canyonlands" resource="csrc://canyonlands" owner="site" >
  <CommandStartup>
   <Options>
    <Option name="SSH_USER_NAME" label="User Login">
     <String default="username" />
    </Option>
    <Option name="NODES" label="Number of Nodes">
     <Range type="int" min="1" max="4" step="1" default="1" />
    </Option>
    <Option name="MINUTES" label="Number of Minutes">
     <Range type="int" min="1" max="60" step="15" default="60" />
    </Option>
   </Options>
   <SSHCommand exec="python3 /myDirectory/myServersidePythonScript.py" timeout="0" delay="5">
    <SSHConfig user="$SSH_USER_NAME$">
      <Terminal/>
    </SSHConfig>
     <Arguments>
      <Argument value="$NODES$" />
      <Argument value="$PV_CLIENT_HOST$" />
      <Argument value="$MINUTES$" />
     </Arguments>
   </SSHCommand>
  </CommandStartup>
 </Server>

</Servers>

```
