# Issue with achieving connection to Google Clould through processing

**URL:** <https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560>\
**Category:** Processing\
**Created:** [March 23, 2019, 7:38pm UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560 "2019-03-23T19:38:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgeklr](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@georgeklr](https://discourse.processing.org/u/georgeklr)\
**Post date:** [March 23, 2019, 7:38pm UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560/1 "2019-03-23T19:38:40Z")

</div>

I created a google instance, using google cloud, following the standard procedure i created a key, in order to connect remotely through third parties. I am able to connect to the instance through terminal, script , java and python. However, when i try to connect through processing i get an error, that the connection could not be establish and the key can not be authenticated, resulting in no actions to be done. Do you have any idea how can i overcome this situation? Thank you in advance

As mentioned above, i was able to establish a connection direct from the use of Terminal, Script, python using the “OS” library, java using process builder. However i tried also couple things through processing: I tried to directly connect, but failed. Furthermore, i tried to invoke a script but it failed. Also i tried to invoke python through processing but also it failed.

```auto

```

---

<div class="post-metadata">

**Author:** ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)\
**Post date:** [March 23, 2019, 9:15pm UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560/2 "2019-03-23T21:15:26Z")

</div>

If you post to multiple sites, please link between your posts so we know what help you’ve already received.

This question has also been posted here:

> <https://stackoverflow.com/questions/55312227/issue-with-achieving-connection-to-google-clould-through-processing>

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [March 24, 2019, 5:48am UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560/3 "2019-03-24T05:48:47Z")

</div>

You need to show some code how you are accomplishing this connection. I am curious what you are trying to do? From what I read, it seems you are using a GCE.

One thing: edit your stack exchange question and remove information that is sensitive such as ip and keys. IP are probably ephemeral . Nevertheless, you should take precautions working with this type of information, specially keys.

Kf

---

<div class="post-metadata">

**Author:** ![georgeklr](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@georgeklr](https://discourse.processing.org/u/georgeklr)\
**Post date:** [March 24, 2019, 10:06am UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560/4 "2019-03-24T10:06:20Z")

</div>

Thanks for the reply.The way i am trying to achieve a connection is through ssh. I start my application from processing, and i want to establish connection to my cloud, so i could be take advantage of the computation power that it offers. I am not trying to do any thing unusual, just to connect remotely and transfer some files on the cloud. The code i am running is just some scrips for secure copy of files. The files are transferred if i execute the command through terminal

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [March 26, 2019, 6:58am UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560/5 "2019-03-26T06:58:24Z")

</div>

> [@georgeklr](#):
>
> As mentioned above, i was able to establish a connection direct from the use of Terminal, Script, python using the “OS” library, java using process builder. However i tried also couple things through processing: I tried to directly connect, but failed. Furthermore, i tried to invoke a script but it failed. Also i tried to invoke python through processing but also it failed.

I think it will help if you show your code. I understand the command that you execute works if you execute it right from the terminal. It is odd id does not work from Processing. Are you using `exec()` for that?

Kf

---

<div class="post-metadata">

**Author:** ![georgeklr](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@georgeklr](https://discourse.processing.org/u/georgeklr)\
**Post date:** [March 27, 2019, 8:35am UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560/6 "2019-03-27T08:35:26Z")

</div>

Thanks for the reply. The code i am using is that:

```auto
try
  {
    procBuildScript2 = new ProcessBuilder("/home/george/Desktop/object/Scripts/CopyData/CopyData.sh").start();
  }
  catch (IOException e)
  {
    e.printStackTrace();
  }

```

* * *

```auto
scp -i /home/george/Desktop/object/id_rsa.pub /home/george/Desktop/object/myDataForTrain.txt username@ip:

```

And above is the script that is inovked

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [March 27, 2019, 8:53pm UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560/7 "2019-03-27T20:53:47Z")

</div>

> [@georgeklr](#):
>
> above is the script that is invoked

Where? I don’t see it, in this or in the stackoverflow thread.

Please post the script – not a screenshot of the script.

---

<div class="post-metadata">

**Author:** ![georgeklr](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@georgeklr](https://discourse.processing.org/u/georgeklr)\
**Post date:** [March 27, 2019, 9:06pm UTC](https://discourse.processing.org/t/issue-with-achieving-connection-to-google-clould-through-processing/9560/8 "2019-03-27T21:06:02Z")

</div>

```auto
scp -i /home/george/Desktop/object/id_rsa.pub /home/george/Desktop/object/myDataForTrain.txt username@ip:

```

That is the script that i execute
