Score:2

Unable to SSH to remote computer

cn flag
2.1

I have two proxy (two ip address) connections in my Ubuntu computer, and I am trying to connect through ssh to my university supercomputer using "corkscrew", but not able to connect, it fails as

Couldn't establish connection to proxy: Connection timed out
kex_exchange_identification: Connection closed by remote host

Could you please help me out here ?

I am able to connect to same supercomputer following the same process from another ubuntu computer which has only single ip

output of ssh -v:

sachin@localhost:~$ ssh -v sachinv@atulya.compunet.barc.in
OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/sachin/.ssh/config
debug1: /home/sachin/.ssh/config line 1: Applying options for *.compunet.barc.in
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Executing proxy command: exec corkscrew compunetgw.barc.gov.in 8080 atulya.compunet.barc.in 22 ~/.ssh/proxyauth
debug1: identity file /home/sachin/.ssh/id_rsa type 0
debug1: identity file /home/sachin/.ssh/id_rsa-cert type -1
debug1: identity file /home/sachin/.ssh/id_dsa type -1
debug1: identity file /home/sachin/.ssh/id_dsa-cert type -1
debug1: identity file /home/sachin/.ssh/id_ecdsa type -1
debug1: identity file /home/sachin/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/sachin/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/sachin/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/sachin/.ssh/id_ed25519 type -1
debug1: identity file /home/sachin/.ssh/id_ed25519-cert type -1
debug1: identity file /home/sachin/.ssh/id_ed25519_sk type -1
debug1: identity file /home/sachin/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/sachin/.ssh/id_xmss type -1
debug1: identity file /home/sachin/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
Couldn't establish connection to proxy: Connection timed out
kex_exchange_identification: Connection closed by remote host

output of ip a

sachin@localhost:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever    
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:e0:4c:68:12:d2 brd ff:ff:ff:ff:ff:ff
    inet 10.143.111.41/24 brd 10.143.111.255 scope global noprefixroute enp1s0
       valid_lft forever preferred_lft forever
    inet6 fe80::b3fe:fd97:d21c:6b88/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever      
3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 70:85:c2:ba:10:14 brd ff:ff:ff:ff:ff:ff
    inet 10.15.111.45/24 brd 10.15.111.255 scope global noprefixroute enp4s0
       valid_lft forever preferred_lft forever
    inet6 fe80::b524:bbb9:23f7:32e9/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

output of ip route

sachin@localhost:~$ ip route
default via 10.143.111.1 dev enp1s0 proto static metric 20100
default via 10.15.111.1 dev enp4s0 proto static metric 20101
10.15.91.230 via 10.15.111.1 dev enp4s0
10.15.111.0/24 dev enp4s0 proto kernel scope link src 10.15.111.45 metric 101'     
10.143.111.0/24 dev enp1s0 proto kernel scope link src 10.143.111.41 metric 100'      
90.3.15.135 via 10.15.111.1 dev enp4s0
169.254.0.0/16 dev enp1s0 scope link metric 1000
ch flag
Run `ssh` with `-v` to obtain more detailes on your connection. It may help you find answer or add its output to your question.
Esther avatar
es flag
no, the suggestion was to use `-v` (verbose) not `-V` (version). use `ssh -v username@hostname` or however you would normally run ssh, but with the `-v` (lowercase) flag included. That will give you extra information about exactly what is happening.
Esther avatar
es flag
https://serverfault.com/questions/1015547/what-causes-ssh-error-kex-exchange-identification-connection-closed-by-remote a bunch of suggestions on why this might happen
2.1 avatar
cn flag
2.1
@Esther, Oh! Thanks, Tomorrow, I will check it and update the question accordingly.
2.1 avatar
cn flag
2.1
@Serg, added now
2.1 avatar
cn flag
2.1
@Esther pl have a look on post now
muru avatar
us flag
Also add the output of `ip a` and `ip route -n`, please.
2.1 avatar
cn flag
2.1
@muru added, you may now check it
Score:0
ge flag

I assume ip route show still shows same output.

Run the following commands and try to connect again:

$ip route add default via 10.143.111.1 dev enp1s0 proto static metric 20102
$ip route del default via 10.143.111.1 dev enp1s0 proto static metric 20100

[Edit]

In case operation is not permitted, execute with root previleges:

$sudo ip route add default via 10.143.111.1 dev enp1s0 proto static metric 20102
$sudo ip route del default via 10.143.111.1 dev enp1s0 proto static metric 20100
2.1 avatar
cn flag
2.1
1: Yes, same output. 2: It says `RTNETLINK answers: Operation not permitted `
niyaz avatar
ge flag
You need to execute these commands with root previleges. I added `sudo` commands.
2.1 avatar
cn flag
2.1
Ok, I will do, thanks
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.