I recently faced an issue when trying to connect through SSH to an account on a VPS. For this specific account, I traditionally use the standard username / password combination and everything used to work properly. However, last time I tried to connect, I faced the following issue:
1
2
$ ssh username@domain.com
ssh_exchange_identification: Connection closed by remote host
Using SSH verbose mode provided little additional information.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ ssh username@domain.com -v
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/jimmy/.ssh/config
debug1: /home/jimmy/.ssh/config line 192: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to domain.com [1.2.3.4] port 22.
debug1: Connection established.
debug1: identity file /home/jimmy/.ssh/ids/domain.com/username/id_rsa type -1
debug1: identity file /home/jimmy/.ssh/ids/domain.com/username/id_rsa-cert type -1
debug1: identity file /home/jimmy/.ssh/ids/domain.com/id_rsa type -1
debug1: identity file /home/jimmy/.ssh/ids/domain.com/id_rsa-cert type -1
debug1: identity file /home/jimmy/.ssh/id_rsa type -1
debug1: identity file /home/jimmy/.ssh/id_rsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
It seemed as if the connection was trying to use an SSH key to connect instead of the usual username / password.
There is however a simple solution. It requires access to WHM (so if you don’t, you might need to contact your web hosting company) and you’ll need to re-enable password authentication. To do so, simply follow the steps below:
- Log in as root
- Go to Security Center » SSH Password Authorization
- Click on the Disable Password Auth button (see screenshot below)
- Refresh the page and go back to the SSH Password Authorization page
- Click on the Enable Password Auth button
This fixed the problem and allowed to connect again using the traditional login / password authentication method.
For the time being, comments are managed by Disqus, a third-party library. I will eventually replace it with another solution, but the timeline is unclear. Considering the amount of data being loaded, if you would like to view comments or post a comment, click on the button below. For more information about why you see this button, take a look at the following article.