# connect to server on AWS EC2

**URL:** https://discourse.paraview.org/t/connect-to-server-on-aws-ec2/4323
**Category:** ParaView Support
**Created:** [May 13, 2020, 9:36am UTC](https://discourse.paraview.org/t/connect-to-server-on-aws-ec2/4323 "2020-05-13T09:36:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ashkan\_Rafiee](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ashkan_rafiee/32/3738_2.png) [@Ashkan\_Rafiee](https://discourse.paraview.org/u/Ashkan_Rafiee)
#### Post date: [May 13, 2020, 9:36am UTC](https://discourse.paraview.org/t/connect-to-server-on-aws-ec2/4323/1 "2020-05-13T09:36:25Z")

</div>

Hi  
I want to connect to pvserver on AWS EC2 instance. I created a pvsc configuration as follows (note I need to use ssh key file).

```
<Servers>
  <Server name="ec2" configuration="" resource="cs://x.xxx.xx.xxx:11111">
    <CommandStartup>
      <Options>
        <Option name="SSH_USER" label="SSH Username" save="true">
          <String default="ubuntu"/>
        </Option>
        <Option name="SSH_EXE" label="SSH Executable" save="true">
          <File default="/usr/bin/ssh"/>
        </Option>
        <Option name="SSH_KEY" label="SSH key" save="true">
          <File default="/home/mls5/.ssh/mykey.pem"/>
        </Option>
      </Options>
      <Command exec="$SSH_EXE$" delay="5" timeout="0">
        <Arguments>
          <Argument value="-l"/>
          <Argument value="$SSH_USER$"/>
          <Argument value="-i"/>
          <Argument value="$SSH_KEY$"/>
        </Arguments>
      </Command>
    </CommandStartup>
  </Server>
</Servers>

```

but I get the “connection aborted” with the following error

usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-b bind\_address] [-c cipher\_spec]  
[-D [bind\_address:]port] [-E log\_file] [-e escape\_char]  
[-F configfile] [-I pkcs11] [-i identity\_file]  
[-J [user@]host[:port]] [-L address] [-l login\_name] [-m mac\_spec]  
[-O ctl\_cmd] [-o option] [-p port] [-Q query\_option] [-R address]  
[-S ctl\_path] [-W host:port] [-w local\_tun[:remote\_tun]]  
[user@]hostname [command]

Command aborted.

Any comments/help is really appreciated  
Ashkan

---

<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 13, 2020, 10:18am UTC](https://discourse.paraview.org/t/connect-to-server-on-aws-ec2/4323/2 "2020-05-13T10:18:26Z")

</div>

ParaView now support native ssh. See here :

> [@Using SSH Support to secure your client/server communication with ParaView](https://discourse.paraview.org/t/using-ssh-support-to-secure-your-client-server-communication-with-paraview/682):
>
> Since [mr](https://gitlab.kitware.com/paraview/paraview/merge_requests/2652) and [mr](https://gitlab.kitware.com/paraview/paraview/merge_requests/2821), ParaView master now has a support for ssh, which includes port forwarding. In order to use it, you will need first to install a terminal and an ssh tool. Terminals are available by default on Windows, Mac and virtually on all linux distribution. Ssh is available by default on mac, on all package manager on all linux distribution. On windows ssh is now available by default with the Windows 10 Spring update but we recommend installing [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/) as support for rc connection is bett…

---

<div class="post-metadata">

### Author: ![Ashkan\_Rafiee](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ashkan_rafiee/32/3738_2.png) [@Ashkan\_Rafiee](https://discourse.paraview.org/u/Ashkan_Rafiee)
#### Post date: [May 13, 2020, 11:12am UTC](https://discourse.paraview.org/t/connect-to-server-on-aws-ec2/4323/3 "2020-05-13T11:12:25Z")

</div>

Thanks for reply Mat.  
Can you explain how I can tailor the pvsc file for my problem. I tried to also follow the simple server startup in the link you sent and it pops up the terminal and I entered “-l ubuntu -i ~/.ssh/mykey.pem” and pressed enter but did not work.  
I sure I am doing it correctly and would appreciate your input.  
Thanks

---

<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, 2020, 4:22am UTC](https://discourse.paraview.org/t/connect-to-server-on-aws-ec2/4323/4 "2020-05-14T04:22:56Z")

</div>

> [@Ashkan\_Rafiee](#):
>
> “-l ubuntu -i ~/.ssh/mykey.pem”

What are you expecting this to do ?  
The terminal opening should only be needed to enter your password.

---

<div class="post-metadata">

### Author: ![Ashkan\_Rafiee](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ashkan_rafiee/32/3738_2.png) [@Ashkan\_Rafiee](https://discourse.paraview.org/u/Ashkan_Rafiee)
#### Post date: [May 14, 2020, 5:41am UTC](https://discourse.paraview.org/t/connect-to-server-on-aws-ec2/4323/5 "2020-05-14T05:41:21Z")

</div>

I am using ssh key to access the server and am not using any password. Basically, “ssh ubuntu@xx.xxx.xx.xx -i ~/.ssh/mykey.pem” is how I connect to the server (without password) from linux terminal. I need to make paraview to connect in the same way to the server.

---

<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, 2020, 5:45am UTC](https://discourse.paraview.org/t/connect-to-server-on-aws-ec2/4323/6 "2020-05-14T05:45:29Z")

</div>

I’m afraid this usecase was not implemented sadly. Feel free to open a feature request on our gitlab :  
[https://gitlab.kitware.com/paraview/paraview/issues](https://gitlab.kitware.com/paraview/paraview/issues)

In the meantime, you will have to fix your inital .pvsc file.

A good debug tools is to set SSH\_EXE to /usr/bin/echo in order to check the args.
