Issue with achieving connection to Google Clould through processing

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.


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:

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

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

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

1 Like

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

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

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

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

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

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

That is the script that i execute