Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
283 Views

cannot Connect from Linux(SSH)

I followed this guide to connect devcloud from linux but failed.

The error log is,

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /home/intel/.ssh/config
debug1: /home/intel/.ssh/config line 4: Applying options for *
debug1: /home/intel/.ssh/config line 7: Applying options for devcloud
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Executing proxy command: exec /bin/nc -x proxy-us.intel.com:1080 devcloud 22
debug1: permanently_drop_suid: 1000
debug1: key_load_public: No such file or directory
debug1: identity file /home/intel/.ssh/devcloud-access-key-34105.txt type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/intel/.ssh/devcloud-access-key-34105.txt-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_exchange_identification: Connection closed by remote host

any idea about this?

Tags (1)
0 Kudos
15 Replies
Highlighted
Employee
283 Views

Hi,

Please make sure that the correct path and name of the key is provided in the config file.
ie, if the name is "devcloud-access-key-34105.txt" and it is in the  "~/.ssh/" folder,
the config file contains:

IdentityFile ~/.ssh/devcloud-access-key-34105.txt
ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-34105.txt guest@devcloud.intel.com

Manually verify whether the key file is present in the ~/.ssh folder and set correct permissions as below:

chmod 600 ~/.ssh/devcloud-access-key-34105.txt
chmod 600 ~/.ssh/config 

If issue persists, download the correct key once again using chrome browser and try with the same.

0 Kudos
Highlighted
283 Views

Thanks. But this issue still exists after applying the steps you suggested. I was trying to connect  DevCloud from Intel China. Should I set a certain ssh proxy, or any ssh configuration missing in my environment?

More info:

I tried to connect DevCloud with external network not Intel's, it can connect. It looks like a ssh proxy issue. Is it possible for DevCloud team provide an available ssh proxy and the relevant configuration method? Otherwise, we cannot access it from Intel China. Thanks.

0 Kudos
Highlighted
Moderator
283 Views

Hi,
Since you are connecting from Intel network, you need to set some proxies in the config file.
Could you please create a config file (~/.ssh/config) with the following lines.


    Host devcloud_proxy
    User u34105
    HostName c009
    Port 4036
    IdentityFile "/home/intel/.ssh/devcloud-access-key-34105.txt"
    ProxyCommand ssh -T devcloud-socks-proxy

    Host devcloud-socks-proxy
    User guest
    Hostname cluster.colfaxresearch.com
    IdentityFile "/home/intel/.ssh/devcloud-access-key-34105.txt"
    LocalForward 4036 colfaxserver:22
    ProxyCommand nc -x proxy-us.intel.com %h %p


Hope it helps. If you face still face any issues, please feel free to reach out to us.

0 Kudos
Highlighted
283 Views

After running "ssh devcloud_proxy -vvv", error shows as follows this time:

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /home/intel/.ssh/config
debug1: /home/intel/.ssh/config line 6: Applying options for devcloud_proxy
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Executing proxy command: exec ssh -T devcloud-socks-proxy
debug1: permanently_drop_suid: 1000
debug1: key_load_public: No such file or directory
debug1: identity file /home/intel/.ssh/devcloud-access-key-34105.txt type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/intel/.ssh/devcloud-access-key-34105.txt-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/intel/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/intel/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_exchange_identification: Connection closed by remote host
ssh_exchange_identification: Connection closed by remote host

The content in config file:

#Host devcloud
#    User u34105
#    IdentityFile ~/.ssh/devcloud-access-key-34105.txt
#    ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-34105.txt guest@devcloud.intel.com

Host devcloud_proxy
    User u34105
    HostName c009
    Port 4036
    IdentityFile ~/.ssh/devcloud-access-key-34105.txt
    ProxyCommand ssh -T devcloud-socks-proxy

Host devcloud-socks-proxy
    User guest
    Hostname cluster.colfaxresearch.com
    IdentityFile ~/.ssh/devcloud-access-key-34105.txt
    LocalForward 4036 colfaxserver:22
    ProxyCommand nc -x proxy-us.intel.com %h %p

 

0 Kudos
Highlighted
Moderator
283 Views

Hi,

Could you please try removing the debug mode from the ssh command as below

ssh devcloud_proxy

 

0 Kudos
Highlighted
283 Views

If I removing the debug mode, the command returned immediately with the following log:

ssh_exchange_identification: Connection closed by remote host
ssh_exchange_identification: Connection closed by remote host

0 Kudos
Highlighted
Employee
283 Views

Hi,

Could you please check whether you are able to connect to DevCloud via Jupyter Notebook from the internal network?

 

0 Kudos
Highlighted
283 Views

Yes, I was able to connect devcloud via Jupyter notebook. However, it is not convenient to access files and execute shell command in that way.

0 Kudos
Highlighted
Employee
283 Views

Please try by changing the config file as below (replace the user id with yours):

 

Host devcloud
User u301XX
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-301XX.txt
ProxyCommand ssh -T devcloud-via-proxy


Host devcloud-via-proxy
User guest
Hostname cluster.colfaxresearch.com
IdentityFile ~/.ssh/devcloud-access-key-301XX.txt
LocalForward 4022 c009:22
ProxyCommand nc -x proxy-us.intel.com:1080 %h %p
#ProxyCommand nc -x child-prc.intel.com:913 %h %p

 

0 Kudos
Highlighted
283 Views

It seems the same issue.

ssh_exchange_identification: Connection closed by remote host
ssh_exchange_identification: Connection closed by remote host

0 Kudos
Highlighted
283 Views

I use the following config file (modified to your user id) , it works for me.

Host devcloud
    User u34105
    HostName localhost
    IdentityFile ~/.ssh/devcloud-access-key-34105.txt
    ProxyCommand ssh -T devcloud-via-proxy

Host devcloud-via-proxy
    User guest
    Hostname devcloud.intel.com
    IdentityFile ~/.ssh/devcloud-access-key-34105.txt
    LocalForward 4022 c009:22
    ProxyCommand nc -x proxy-us.intel.com:1080 %h %p

0 Kudos
Highlighted
283 Views

It still doesn't work. Is there any special configuration need to be done first?

0 Kudos
Highlighted
Employee
283 Views

Try with below config:

 

Host devcloud
User u34105
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-34105.txt
ProxyCommand ssh -T devcloud-via-proxy


Host devcloud-via-proxy
User guest
Hostname cluster.colfaxresearch.com
IdentityFile ~/.ssh/devcloud-access-key-34105.txt
LocalForward 4022 c009:22
ProxyCommand nc -x child-prc.intel.com:1080 %h %p

0 Kudos
Highlighted
283 Views

Yes, it works finally. Thank you all for your help these days!

0 Kudos
Highlighted
Employee
283 Views

Happy to know that it worked!

Closing this thread. Feel free to raise a new thread in case you face any further issues.

 

0 Kudos