Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Nikhil_T
Novice
400 Views

How do I connect VSCode to devcloud in windows

Jump to solution

Hi there!

 

I am a new user to devcloud and I am unable to figure out how to connect to the devcloud in windows using VS Code. Can anyone please provide step by step procedure for the same. I tried following the steps mentioned for VS code but when I type ssh devcloud in the VS code terminal it says ssh: Could not resolve hostname devcloud: No such host is known.

0 Kudos

Accepted Solutions
AthiraM_Intel
Moderator
308 Views

Hi,


Could you please share the configuration?


Also make sure that you have downloaded the right key. Please try to download the key manually and check again.


Thanks.




View solution in original post

17 Replies
AthiraM_Intel
Moderator
369 Views

Hi,

 

Thanks for reaching out to us.

 

Please make sure that you have done all the configuration steps given in the following link to connect to DevCloud :

 

https://devcloud.intel.com/oneapi/documentation/connect-with-vscode/

 

This link provides all the steps with screenshot. Please make sure that you completed all the steps.

 

Also, you need to setup SSH config and the detailed steps are given in the following documentation :

 

https://devcloud.intel.com/oneapi/documentation/connect-with-ssh-linux-macos/

 

You can find the host name in the configuration file ./.ssh/config

 

For example , if this is the config file details :

 

Host devcloud

User uxxxxx

IdentityFile <path to key>/devcloud-access-key-xxxxx.txt

ProxyCommand ssh -T -i <path to key>/devcloud-access-key-xxxxx.txt guest@devcloud.intel.com

 

 Then do :

 

ssh devcloud

 

(the name corresponding to the Host is devcloud in first line )

Please provide the complete path for the key.

If you face any issue, please let us know.

 

Thanks.

 

AthiraM_Intel
Moderator
348 Views

Hi,


Could you please give us an update? Is your issue resolved?


Thanks.


Nikhil_T
Novice
333 Views

Hi there! (I am using the terminal of VS Code for all the command execution)

I did all the steps but I am unable to connect to the devcloud. FYI, I did the following :

1 ) Option 1 Automated Configuration : Ran the bash command and it resulted in the following:

The /root/.ssh directory for SSH client configuration already exists.
Appending SSH connection configuration to /root/.ssh/config
Creating the private SSH key /root/.ssh/devcloud-access-key-xxxxx.txt
Important: this file is your access key, keep it safe like you would a password.
Done! Now you can access Intel DevCloud by running ssh devcloud or, if you are behind a proxy, ssh devcloud.proxy

2 ) Then I did rm command for the cleanup

3) When I do ssh devcloud in the terminal of VS Code, it says the following:

ssh: Could not resolve hostname devcloud: No such host is known.

 

These things were mentioned in https://devcloud.intel.com/oneapi/documentation/connect-with-ssh-linux-macos/

 

Could you please tell what could be the issue.

 

 

Tags (1)
Nikhil_T
Novice
329 Views

@AthiraM_Intel 

I did ssh devcloud-vscode (since this was mentioned in the file) but it says :

ssh: connect to host localhost port 5022: Connection refused

Nikhil_T
Novice
325 Views

I was able to resolve this issue. I was supposedly doing it in VS code when it should be done in cygwin. But now I face another issue:

When I do ssh devcloud in cygwin I get this:

 

$ ssh devcloud
ssh: connect to host devcloud.intel.com port 22: Connection timed out
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535

AthiraM_Intel
Moderator
309 Views

Hi,


Could you please share the configuration?


Also make sure that you have downloaded the right key. Please try to download the key manually and check again.


Thanks.




View solution in original post

Nikhil_T
Novice
296 Views

@AthiraM_Intel  I am able to connect but it connect only a few times. Also, it gets disconnected after a few minutes. 

 

Additionally , I want to ask that if I connect it through VSCode and I write code in the VSCode through SSH, if I run it in the VS code, does it run on the devcloud ? 

Tags (1)
AthiraM_Intel
Moderator
273 Views

Hi,


Please make sure that the network is consistent.

Also share the screenshot of the error.


Regarding the second query, You can log into the Intel DevCloud by


ssh devcloud


There you can run your programs. It will run on DevCloud.


Thanks.



Nikhil_T
Novice
267 Views

This is the error that I get when I do ssh devcloud 

 

$ ssh devcloud
ssh: connect to host devcloud.intel.com port 22: Connection timed out
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535

Sometimes it connects and stays there for like 30 mins but after that it closes automatically and says something like broken pipe error. 

AthiraM_Intel
Moderator
248 Views

Hi,


Could you please share the config file to check if there is any issue.


The connection loss after 30 minutes is due to no activity in the shell. 


Thanks.



Nikhil_T
Novice
244 Views

@AthiraM_Intel 

 

PFA my config file.

AthiraM_Intel
Moderator
232 Views

Hi,


From your previous post we could see that, you were able to connect and facing issue of disconnection after 30 minutes.

That is due to no activity in the shell.


You can prevent ssh session from exiting.

In Cygwin we have "ServerAliveInterval" option , please check the below link for more information.

 https://superuser.com/questions/612401/keeping-cygwin-ssh-session-alive


Could you please let us know if you have any further issues.


Thanks.


AthiraM_Intel
Moderator
205 Views

Hi,


Could you please give us an update?


Thanks.


Nikhil_T
Novice
191 Views

Hi there! Yes I am able to connect via VS Code and Cygwin but with intermittent disconnections. 

AthiraM_Intel
Moderator
175 Views

Hi,

 

The disconnection is mainly due to network issues and no activity in the shell for a long time.

You could use nohup command to run the job. Nohup is a command in Linux systems that keep processes running even after exiting the shell or terminal.

Please use the below command to run your job file.

nohup qsub job &

You can view the output of your script in the nohup.out file, which is created while running the job.

For more information, you can refer below link:

https://community.intel.com/t5/Intel-DevCloud/client-loop-send-disconnect-Connection-reset-by-peer/m...

 

Since your initial issue is resolved, can we close this thread?

 

Thanks.

 

 

 

 

AthiraM_Intel
Moderator
120 Views

Hi,


Could you please let us know whether we can close this case?


Thanks.


AthiraM_Intel
Moderator
18 Views

Hi,


We have not heard back from you, we wont be monitoring this thread. If you need further assistance, please post a new thread.


Thanks.