Can't login with root via SSH

Posted September 25, 2014 9.2k views

I can’t login via ssh. I added a ssh key, rebooted my droplet, created a new one, … but nothing seems to work.
If I run ‘ssh’, I get ssh: connect to host port 22 bad file number.
I don’t think it has anything to do with my ssh keys, because other projects are working fine…

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

With verbose I get the following:
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to [] port 22.
debug1: connect to address port 22: Attempt to connect timed out
without establishing a connection
ssh: connect to host port 22: Bad file number

For those with similar problems: I added a SSH key, but reset my root password. I think that prevented me to log in via SSH. Rebuild the droplet and you are good to go.