Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used to connect normally to the website on digitalocean using ssh keys and it works normally. Currently I tried to connect and suddenly I keep getting: ssh_exchange_identification: read: Operation timed out.

I tried to run the ssh command again using -vvv and I got the following:

OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 102: Applying options for *
debug1: Connecting to ip [ip] port 22.
debug1: Connection established.
debug1: identity file /Users/safwany/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/safwany/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/safwany/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/safwany/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/safwany/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/safwany/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/safwany/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/safwany/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
ssh_exchange_identification: read: Operation timed out

Any idea what is the cause for such error and how to fix it?

Update: I ran ls -al ~/.ssh and got the following:

total 160
drwx------   15 safwany  staff    510 Jul 12 23:52 .
drwx------+ 109 safwany  staff   3706 Jul 13 00:02 ..
-rwx------    1 safwany  staff   2437 Jul 13 00:02 authorized_keys
-rw-------    1 safwany  staff   1679 Mar 17  2015 digitalocean
-rw-r--r--    1 safwany  staff    413 Mar 17  2015 digitalocean.pub
-rw-------    1 safwany  staff   1679 Mar  4  2015 fortrabbit
-rw-r--r--    1 safwany  staff    413 Mar  4  2015 fortrabbit.pub
-rwx------    1 safwany  staff   1766 Nov 21  2014 github_rsa
-rwx------    1 safwany  staff    404 Nov 21  2014 github_rsa.pub
-rw-------    1 safwany  staff   1675 Jul  1  2015 id_boot2docker
-rw-r--r--    1 safwany  staff    413 Jul  1  2015 id_boot2docker.pub
-rw-------    1 safwany  staff   1675 Nov 23  2014 id_rsa
-rw-------    1 safwany  staff    381 Jul 12 23:16 id_rsa.pub
-rw-------    1 safwany  staff  17736 Jul 10 17:11 known_hosts
-rw-------    1 safwany  staff  15268 Feb 21 22:44 known_hosts.old
share|improve this question
    
This might be a file permissions issue: see unix.stackexchange.com/questions/235565/… – John1024 Jul 12 at 21:38
    
@John1024 Could you elaborate more? I can't find a clear answer – omarsafwany Jul 12 at 21:49
    
ssh is very picky about file permissions. Can you run ls -al ~/.ssh and show us the results. – John1024 Jul 12 at 21:52
    
@John1024 Check the update – omarsafwany Jul 12 at 22:04
1  
The most common location for sshd logs is /var/log/secure, you can grep it for your own public IP (connecting party) to find the relevant pieces. – grochmal Jul 12 at 23:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.